{"openapi":"3.0.0","paths":{"/agents":{"post":{"description":"Creates an agent with the complete configuration surface available in the UI. Supports CALL, CHAT, EMAIL, and TRIGGER agents. Most fields are optional and use canonical shared agent defaults. For a basic call agent, only name and voiceId are needed. No voice or phone number is selected automatically; IDs shown in examples are placeholders, not defaults. Use callParams for speech, scheduling, retries, voicemail, recording, and web calls; chatParams and emailParams configure their respective channels. steps or nestedSteps define the script, edges connect graph nodes, and fallbacks define recovery behavior. toolFunctions, triggers, preCallActions, knowledgeBaseIds, guardrailSettings, privacy, DNC, and memory settings are also supported. Arrays use replacement semantics and empty arrays clear values. The convenience fields voiceId and phoneNumbers override callParams.voice and callParams.phonesFrom. Omitted timezones default to UTC for deterministic API behavior; send an IANA timezone when local scheduling is required. Call, chat, and email agents are created inactive; trigger agents activate immediately. Organization, ownership, audit, lifecycle, generated credentials, and provider-managed fields are derived by the server.","operationId":"CampaignPublicController_createCampaign[0]","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateExternalDto"},"examples":{"minimal":{"summary":"Minimal outgoing call agent","value":{"name":"Customer follow-up calls","voiceId":"507f1f77bcf86cd799439011"}},"configured":{"summary":"Outgoing agent with phone numbers and a webhook","value":{"name":"Customer follow-up calls","type":"CALL","isIncoming":false,"callParams":{"voice":"507f1f77bcf86cd799439011","phonesFrom":["+14155552671"],"language":"en-US","timezone":"America/New_York"},"steps":[{"id":"greeting","type":"OTHER","template":"Hello {{name}}, this is the support team.","meeting":null,"description":null}],"webhooks":[{"name":"Call completed","url":"https://example.com/webhooks/calls","events":["CALL_FINISHED"],"isAdvanced":false}]}},"externalTool":{"summary":"Agent with an external tool function","value":{"name":"Order status assistant","voiceId":"507f1f77bcf86cd799439011","toolFunctions":[{"name":"Get order status","apiType":"EXTERNAL","functionDefinition":{"name":"get_order_status","description":"Retrieves the current status for an order.","parameters":{"type":"object","properties":{"orderId":{"type":"string","description":"The customer order identifier."}},"required":["orderId"],"additionalProperties":false}},"apiData":{"url":"https://example.com/orders/status","method":"POST"}}]}},"chat":{"summary":"WhatsApp chat agent","value":{"name":"WhatsApp support","type":"CHAT","chatParams":{"channel":"WHATSAPP","phonesFrom":["+14155552671"]},"steps":[{"id":"welcome","type":"OTHER","template":"Hi {{name}}, how can we help?","meeting":null,"description":null}]}},"email":{"summary":"Email agent using schema defaults","value":{"name":"Customer email follow-up","type":"EMAIL","emailParams":{"outboundConnectionIds":["507f1f77bcf86cd799439021"],"inboundConnectionIds":[]}}},"trigger":{"summary":"Trigger agent","value":{"name":"CRM event follow-up","type":"TRIGGER","triggers":[]}}}}}},"responses":{"201":{"description":"Agent created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/AgentExternalPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - feature is currently disabled","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create an agent","tags":["Agents"]},"get":{"description":"Get all agents by organization ID. Returns an array of AgentPublicDto. Optionally filter by campaign group ID — only agents belonging to the specified group within the same organization will be returned.","operationId":"CampaignPublicController_getCampaignsByOrganizationId[0]","parameters":[{"name":"campaignGroupId","required":false,"in":"query","description":"Optional filter: id of the campaign group as a string ObjectId value. When provided, only agents belonging to this group within the organization are returned.","schema":{"type":"string"}},{"name":"agentGroupId","required":false,"in":"query","description":"Optional filter: id of the agent group as a string ObjectId value. This is an alias of campaignGroupId.","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Id of the organization as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentExternalPublicDto"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get all agents by organization ID","tags":["Agents"]}},"/campaigns":{"post":{"description":"Creates an agent with the complete configuration surface available in the UI. Supports CALL, CHAT, EMAIL, and TRIGGER agents. Most fields are optional and use canonical shared agent defaults. For a basic call agent, only name and voiceId are needed. No voice or phone number is selected automatically; IDs shown in examples are placeholders, not defaults. Use callParams for speech, scheduling, retries, voicemail, recording, and web calls; chatParams and emailParams configure their respective channels. steps or nestedSteps define the script, edges connect graph nodes, and fallbacks define recovery behavior. toolFunctions, triggers, preCallActions, knowledgeBaseIds, guardrailSettings, privacy, DNC, and memory settings are also supported. Arrays use replacement semantics and empty arrays clear values. The convenience fields voiceId and phoneNumbers override callParams.voice and callParams.phonesFrom. Omitted timezones default to UTC for deterministic API behavior; send an IANA timezone when local scheduling is required. Call, chat, and email agents are created inactive; trigger agents activate immediately. Organization, ownership, audit, lifecycle, generated credentials, and provider-managed fields are derived by the server.","operationId":"CampaignPublicController_createCampaign[1]","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCreateExternalDto"},"examples":{"minimal":{"summary":"Minimal outgoing call agent","value":{"name":"Customer follow-up calls","voiceId":"507f1f77bcf86cd799439011"}},"configured":{"summary":"Outgoing agent with phone numbers and a webhook","value":{"name":"Customer follow-up calls","type":"CALL","isIncoming":false,"callParams":{"voice":"507f1f77bcf86cd799439011","phonesFrom":["+14155552671"],"language":"en-US","timezone":"America/New_York"},"steps":[{"id":"greeting","type":"OTHER","template":"Hello {{name}}, this is the support team.","meeting":null,"description":null}],"webhooks":[{"name":"Call completed","url":"https://example.com/webhooks/calls","events":["CALL_FINISHED"],"isAdvanced":false}]}},"externalTool":{"summary":"Agent with an external tool function","value":{"name":"Order status assistant","voiceId":"507f1f77bcf86cd799439011","toolFunctions":[{"name":"Get order status","apiType":"EXTERNAL","functionDefinition":{"name":"get_order_status","description":"Retrieves the current status for an order.","parameters":{"type":"object","properties":{"orderId":{"type":"string","description":"The customer order identifier."}},"required":["orderId"],"additionalProperties":false}},"apiData":{"url":"https://example.com/orders/status","method":"POST"}}]}},"chat":{"summary":"WhatsApp chat agent","value":{"name":"WhatsApp support","type":"CHAT","chatParams":{"channel":"WHATSAPP","phonesFrom":["+14155552671"]},"steps":[{"id":"welcome","type":"OTHER","template":"Hi {{name}}, how can we help?","meeting":null,"description":null}]}},"email":{"summary":"Email agent using schema defaults","value":{"name":"Customer email follow-up","type":"EMAIL","emailParams":{"outboundConnectionIds":["507f1f77bcf86cd799439021"],"inboundConnectionIds":[]}}},"trigger":{"summary":"Trigger agent","value":{"name":"CRM event follow-up","type":"TRIGGER","triggers":[]}}}}}},"responses":{"201":{"description":"Agent created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/AgentExternalPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - feature is currently disabled","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create an agent","tags":["Agents"]},"get":{"description":"Get all agents by organization ID. Returns an array of AgentPublicDto. Optionally filter by campaign group ID — only agents belonging to the specified group within the same organization will be returned.","operationId":"CampaignPublicController_getCampaignsByOrganizationId[1]","parameters":[{"name":"campaignGroupId","required":false,"in":"query","description":"Optional filter: id of the campaign group as a string ObjectId value. When provided, only agents belonging to this group within the organization are returned.","schema":{"type":"string"}},{"name":"agentGroupId","required":false,"in":"query","description":"Optional filter: id of the agent group as a string ObjectId value. This is an alias of campaignGroupId.","schema":{"type":"string"}},{"name":"organizationId","required":true,"in":"query","description":"Id of the organization as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentExternalPublicDto"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get all agents by organization ID","tags":["Agents"]}},"/campaigns/{campaignId}":{"put":{"description":"Replaces the complete writable agent configuration using the same relaxed, defaulted schema as agent creation. No phone number or voice is inferred from the organization. Omitted fields return to their schema defaults, supplied arrays replace existing arrays, empty arrays clear them, and null clears nullable fields. Use PATCH instead when changing only name, phoneNumbers, or webhooks. Lifecycle state is preserved unless the agent is changed to a trigger agent, which activates immediately. Ownership, audit, generated credentials, and provider-managed fields are preserved by the server.","operationId":"CampaignPublicController_replaceCampaign[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"ID of the agent to replace","schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentReplaceExternalDto"},"examples":{"callAgent":{"summary":"Call agent with a custom script","value":{"name":"Customer follow-up calls","type":"CALL","isIncoming":false,"callParams":{"voice":"507f1f77bcf86cd799439011","phonesFrom":["+14155552671"],"language":"en-US","timezone":"America/New_York"},"steps":[{"id":"greeting","type":"OTHER","template":"Hello {{name}}, how can I help?","meeting":null,"description":null}]}}}}}},"responses":{"200":{"description":"Agent configuration replaced successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/AgentExternalPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - feature is currently disabled","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Replace agent configuration","tags":["Agents"]},"get":{"description":"Get a single agent by its ID. Returns a AgentPublicDto.","operationId":"CampaignPublicController_getCampaign[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/AgentExternalPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get an agent by ID","tags":["Agents"]},"patch":{"description":"Partially updates the specified agent fields","operationId":"CampaignPublicController_update[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"ID of the agent to update","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdatePublicDto"},"examples":{"rename":{"summary":"Rename an agent","value":{"name":"Updated customer follow-up calls"}},"replacePhoneNumbers":{"summary":"Replace assigned call phone numbers","value":{"phoneNumbers":["+14155552671"]}},"clearWebhooks":{"summary":"Remove all agent webhooks","value":{"webhooks":[]}}}}}},"responses":{"200":{"description":"Agent updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - feature is currently disabled","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Update agent","tags":["Agents"]},"delete":{"description":"Archives the agent and cleans up its active workflows and provider configuration. Agent data and related records are retained.","operationId":"CampaignPublicController_deleteCampaign[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"ID of the agent to archive","schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"Agent archived successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - feature is currently disabled","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Delete an agent","tags":["Agents"]}},"/campaigns/{campaignId}/start":{"post":{"description":"Activates the specified agent","operationId":"CampaignPublicController_startCampaign[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Start agent","tags":["Agents"]}},"/campaigns/{campaignId}/stop":{"post":{"description":"Deactivates the specified agent","operationId":"CampaignPublicController_stopCampaign[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Stop agent","tags":["Agents"]}},"/campaigns/{campaignId}/update/interestcriteria":{"post":{"description":"Updates the interest criteria of the specified agent","operationId":"CampaignPublicController_updateInterestCriteria[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignInterestCriteriaZodDto"}}}},"responses":{"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Update interest criteria","tags":["Agents"]}},"/campaigns/{campaignId}/contacts":{"post":{"description":"Adds a contact to the specified agent. Optionally fixes US phone numbers by adding a leading 1 if not present. Returns 400 with detailed error message if phone number validation fails.","operationId":"CampaignPublicController_createContact[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"fixUSPhoneNumber","required":false,"in":"query","description":"Will add 1 to the phone number if it doesn't starts with 1","schema":{"type":"boolean"}},{"name":"ignorePhoneNumberValidation","required":false,"in":"query","description":"Skip phone number validation for contacts","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignContactCreateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSingleContactResponseDto"}}}},"400":{"description":"Bad Request - validation failed. The error message includes detailed information about which fields failed validation (e.g., \"phoneNumber: Phone number is not valid: 225747466045\"). Invalid `data` returns one issue per broken rule in `data`, each with a machine-readable `params.code` (`data_too_large`, `too_many_keys`, `key_too_long`, `invalid_key`, `invalid_characters`).","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}},"example":{"status":"error","message":"Validation failed","data":[{"code":"custom","path":["data"],"message":"total size 7,860 characters (max 4,000; largest: contactDataDescription 7,725, notes 310, email 24)","params":{"code":"data_too_large","totalLength":7860,"max":4000,"largestFields":[{"key":"contactDataDescription","length":7725},{"key":"notes","length":310},{"key":"email","length":24}]}},{"code":"custom","path":["data"],"message":"field name \"first name\" is invalid (must start with a letter, $ or _ and contain only letters, numbers, $ or _)","params":{"code":"invalid_key","key":"first name"}},{"code":"custom","path":["data"],"message":"field \"notes\" contains control character U+000B (allowed: tab, line breaks)","params":{"code":"invalid_characters","key":"notes","codePoint":"U+000B"}}]}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create a contact for an agent","tags":["Contacts"]},"delete":{"description":"Archives all contacts associated with a given agent ID","operationId":"CampaignPublicController_archiveContactsByCampaignId[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactZodDto"},"examples":{"withReason":{"value":{"archiveReason":"No longer relevant"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"archivedCount":{"type":"number"}}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive all agent contacts","tags":["Contacts"]},"get":{"description":"Get all agent contacts. Returns an array of ContactPublicDto. Supports pagination, status filtering and sorting options.","operationId":"CampaignPublicController_getCampaignContacts[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"lastAttemptTo","required":false,"in":"query","description":"Filter contacts up to this last attempt date in ISO 8601 UTC format (e.g. YYYY-MM-DDTHH:mm:ss.sssZ). Default is null.","schema":{"type":"string"}},{"name":"lastAttemptFrom","required":false,"in":"query","description":"Filter contacts from this last attempt date in ISO 8601 UTC format (e.g. YYYY-MM-DDTHH:mm:ss.sssZ). Default is null.","schema":{"type":"string"}},{"name":"archived","required":false,"in":"query","description":"Archived filter. Default is false.","schema":{"type":"boolean"}},{"name":"sortDirection","required":false,"in":"query","description":"Sorting direction. Default is ascending. Possible values: 'asc' or 'desc'.","schema":{"type":"string"}},{"name":"sortAttribute","required":false,"in":"query","description":"Sorting attribute. Name of the entity field to sort by.","schema":{"type":"string"}},{"name":"goals","required":false,"in":"query","description":"Goals filter. Default is all goals.","schema":{"type":"string"}},{"name":"statuses","required":false,"in":"query","description":"Status filter. Default is all statuses.","schema":{"type":"string"}},{"name":"perPage","required":false,"in":"query","description":"Max page size. Default is 50.","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number. Default is 0.","schema":{"type":"number"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentContactExternalDto"}}}}}},"security":[{"Authorization":[]}],"summary":"Get all contacts by agent ID","tags":["Contacts"]}},"/campaigns/{campaignId}/contacts/bulk":{"post":{"description":"Adds contacts to the specified agent. Optionally fixes US phone numbers by adding a leading 1 if not present.","operationId":"CampaignPublicController_createContacts[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"fixUSPhoneNumber","required":false,"in":"query","description":"Will add 1 to the phone number if it doesn't starts with 1","schema":{"type":"boolean"}},{"name":"verbose","required":false,"in":"query","description":"When true, returns detailed contact information including phone numbers and status (created/updated) for each contact. Default is false (returns only contact IDs)","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkContactsCreateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createMultipleContactsResponseDto"}}}},"400":{"description":"Bad Request - validation failed. Invalid `data` on any contact rejects the whole request; each broken rule is reported in `data` with its contact index in `path` and a machine-readable `params.code`.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}},"example":{"status":"error","message":"Validation failed","data":[{"code":"custom","path":["data"],"message":"total size 7,860 characters (max 4,000; largest: contactDataDescription 7,725, notes 310, email 24)","params":{"code":"data_too_large","totalLength":7860,"max":4000,"largestFields":[{"key":"contactDataDescription","length":7725},{"key":"notes","length":310},{"key":"email","length":24}]}},{"code":"custom","path":["data"],"message":"field name \"first name\" is invalid (must start with a letter, $ or _ and contain only letters, numbers, $ or _)","params":{"code":"invalid_key","key":"first name"}},{"code":"custom","path":["data"],"message":"field \"notes\" contains control character U+000B (allowed: tab, line breaks)","params":{"code":"invalid_characters","key":"notes","codePoint":"U+000B"}}]}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create contacts for an agent","tags":["Contacts"]},"delete":{"description":"Archive contacts associated with a given contact IDs array","operationId":"CampaignPublicController_archiveContactsByIds[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactsZodDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"archivedCount":{"type":"number"}}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive contacts by contact IDs","tags":["Contacts"]}},"/campaigns/{campaignId}/contacts/phone-number/bulk":{"delete":{"description":"Archive contacts associated with a given contact phone numbers array","operationId":"CampaignPublicController_archiveContactsByPhoneNumbers[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"fixUSPhoneNumber","required":false,"in":"query","description":"Will add 1 to the phone number if it doesn't starts with 1","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"description":"Accepts a phone-number array or an object with phoneNumbers and an optional archiveReason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactsByPhoneNumbersZodDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"archivedCount":{"type":"number"}}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive contacts by contact phone numbers","tags":["Contacts"]}},"/campaigns/{campaignId}/contacts/{contactId}":{"delete":{"operationId":"CampaignPublicController_archiveContactById[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactZodDto"},"examples":{"withReason":{"value":{"archiveReason":"No longer relevant"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"boolean"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive contact by contact ID","tags":["Contacts"]},"get":{"description":"Get agent contact. Returns an object with the contact","operationId":"CampaignPublicController_getCampaignContactById[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","description":"Id of the contact as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentContactExternalDto"}}}}},"security":[{"Authorization":[]}],"summary":"Get a contact by ID.","tags":["Contacts"]}},"/campaigns/{campaignId}/contacts/phoneNumber/{phoneNumber}":{"delete":{"description":"Archive contact associated with a given contact phone number.","operationId":"CampaignPublicController_archiveContactByPhoneNumber[1]","parameters":[{"name":"campaignId","required":true,"in":"path","schema":{"type":"string"}},{"name":"phoneNumber","required":true,"in":"path","schema":{"type":"string"}},{"name":"fixUSPhoneNumber","required":false,"in":"query","description":"Will add 1 to the phone number if it doesn't starts with 1","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactZodDto"},"examples":{"withReason":{"value":{"archiveReason":"No longer relevant"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"boolean"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive a contact by phone number","tags":["Contacts"]}},"/campaigns/{campaignId}/contacts/{contactId}/calls":{"get":{"description":"Get all calls by agent id and contact id. Returns an array of PaginatedCallPublicDto. Supports pagination.","operationId":"CampaignPublicController_getCampaignContactCalls[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","description":"Id of the contact as a string ObjectId value.","schema":{"type":"string"}},{"name":"perPage","required":false,"in":"query","description":"Max page size. Default is 50.","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number. Default is 0.","schema":{"type":"number"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPaginatedCallExternalDto"}}}}},"security":[{"Authorization":[]}],"summary":"Get calls by agent ID and contact ID","tags":["Calls"]}},"/campaigns/{campaignId}/calls":{"get":{"description":"Get all calls by agent ID. Returns an array of CallPublicDto. Supports pagination.","operationId":"CampaignPublicController_getCampaignCalls[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number. Default is 0.","schema":{"type":"number"}},{"name":"perPage","required":false,"in":"query","description":"Max page size. Default is 50.","schema":{"type":"number"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentCallExternalDto"}}}}}},"security":[{"Authorization":[]}],"summary":"Get all calls by agent ID","tags":["Calls"]}},"/campaigns/{campaignId}/calls/{callId}/webhook-payload":{"get":{"operationId":"CampaignPublicController_getCampaignCallWebhookPayload[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","description":"Id of the call as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":""}},"security":[{"Authorization":[]}],"summary":"Get call webhook payload by agent ID and call ID","tags":["Webhooks"]}},"/campaigns/{campaignId}/report":{"get":{"description":"Get a report of contacts organized by statuses, with an optional archived filter","operationId":"CampaignPublicController_getCampaignReport[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"archived","required":false,"in":"query","description":"Archived filter for getting the report of archived contacts. Default is false.","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCampaignReportDto"}}}}},"security":[{"Authorization":[]}],"summary":"Get contacts report by status","tags":["Contacts"]}},"/campaigns/{campaignId}/webhook/subscribe":{"post":{"description":"Add a new webhook to the specified agent.","operationId":"CampaignPublicController_subscribeWebhook[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"The agent ObjectId as a string.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicWebhooksZodDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"boolean"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Subscribe a Webhook","tags":["Webhooks"]}},"/campaigns/{campaignId}/calls/{callId}/recording":{"get":{"description":"Get a URL for accessing the recording of a call associated with a given agent","operationId":"CampaignPublicController_getCallRecordingUrl[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","description":"Id of the call as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"default":{"description":"URL for the call recording.","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"Authorization":[]}],"summary":"Get call recording URL","tags":["Calls"]}},"/campaigns/{campaignId}/calls/{callId}/pcap":{"get":{"description":"Downloads the PCAP (packet capture) file containing SIP signaling traces for a call. Only available for SIP (Jambonz) calls. The PCAP data is only retained for recent calls.","operationId":"CampaignPublicController_getCallPcap[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","description":"Id of the call as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"PCAP file binary data.","content":{"application/vnd.tcpdump.pcap":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Download call PCAP file","tags":["Calls"]}},"/campaigns/{campaignId}/calls/{callId}/setStatus":{"post":{"description":"Sets the status of the given call of the given agent","operationId":"CampaignPublicController_setCallStatus[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","description":"Id of the call as a string ObjectId value.","schema":{"type":"string"}},{"name":"callStatus","required":true,"in":"query","description":"New status to set for the given call","schema":{"$ref":"#/components/schemas/CallApiStatus"}},{"name":"callReachedGoal","required":true,"in":"query","description":"New reached success criteria status for the given call","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":""}},"security":[{"Authorization":[]}],"summary":"Update call status","tags":["Calls"]}},"/campaigns/{campaignId}/duplicate":{"post":{"description":"Creates a new agent by duplicating the given agent. You can optionally provide a new name or a target organization.","operationId":"CampaignPublicController_duplicateCampaign[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"ID of the agent to duplicate as a valid ObjectId string","schema":{"type":"string"}},{"name":"name","required":false,"in":"query","description":"Name for the duplicated agent","schema":{"type":"string"}},{"name":"toOrganizationId","required":false,"in":"query","description":"Optional ID of a sub-organization to which the agent should be duplicated","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"201":{"description":""}},"security":[{"Authorization":[]}],"summary":"Duplicate an agent","tags":["Agents"]}},"/campaigns/{campaignId}/vocabulary":{"get":{"description":"Returns all STT vocabulary entries for the agent.","operationId":"CampaignPublicController_getVocabulary[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"Vocabulary entries retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"vocabulary":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"sounds_like":{"type":"array","items":{"type":"string"}}}}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get vocabulary entries","tags":["Agents","Vocabulary"]},"post":{"description":"Adds or updates STT vocabulary entries for the agent. Entries are merged by content — new entries with the same content overwrite existing ones.","operationId":"CampaignPublicController_uploadVocabulary[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadVocabularyPublicDto"}}}},"responses":{"200":{"description":"Vocabulary entries uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"totalCount":{"type":"number"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Upload vocabulary entries","tags":["Agents","Vocabulary"]},"put":{"description":"Updates STT vocabulary entries that already exist on the agent. Entries whose content does not match any existing entry are ignored.","operationId":"CampaignPublicController_updateVocabulary[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadVocabularyPublicDto"}}}},"responses":{"200":{"description":"Existing vocabulary entries updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"updatedCount":{"type":"number"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Update existing vocabulary entries","tags":["Agents","Vocabulary"]},"delete":{"description":"Removes all STT vocabulary entries from the agent.","operationId":"CampaignPublicController_clearVocabulary[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"All vocabulary entries cleared","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Clear all vocabulary entries","tags":["Agents","Vocabulary"]}},"/campaigns/{campaignId}/vocabulary/remove":{"post":{"description":"Removes STT vocabulary entries whose content matches the provided words.","operationId":"CampaignPublicController_removeVocabularyWords[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveVocabularyWordsPublicDto"}}}},"responses":{"200":{"description":"Matching vocabulary entries removed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"removedCount":{"type":"number"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Remove specific vocabulary entries","tags":["Agents","Vocabulary"]}},"/agent-groups":{"get":{"description":"Returns every agent group that belongs to the organization derived from the API key, each enriched with the number of agents currently assigned to it.","operationId":"CampaignGroupPublicController_listCampaignGroups[0]","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignGroupPublicDto"}}}}}},"security":[{"Authorization":[]}],"summary":"Get all agent groups for the authenticated organization","tags":["Agent Groups"]}},"/campaign-groups":{"get":{"description":"Returns every agent group that belongs to the organization derived from the API key, each enriched with the number of agents currently assigned to it.","operationId":"CampaignGroupPublicController_listCampaignGroups[1]","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignGroupPublicDto"}}}}}},"security":[{"Authorization":[]}],"summary":"Get all agent groups for the authenticated organization","tags":["Agent Groups"]}},"/campaign-groups/{campaignGroupId}":{"get":{"description":"Returns a single agent group, scoped to the authenticated organization. Returns 404 if the agent group does not exist within the organization.","operationId":"CampaignGroupPublicController_getCampaignGroupById[1]","parameters":[{"name":"campaignGroupId","required":true,"in":"path","description":"Id of the agent group as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignGroupPublicDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get an agent group by id","tags":["Agent Groups"]}},"/organization":{"get":{"description":"Get information for the organization associated with this API key","operationId":"OrganizationPublicController_getCampaignsByOrganizationId","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationPublicDto"}}}}}},"security":[{"Authorization":[]}],"summary":"Get account information","tags":["Organizations"]}},"/organization/sub-organization":{"post":{"description":"Creates sub organization under the main organization associated with the API key","operationId":"OrganizationPublicController_createSubOrganization","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubOrganizationCreatePublicDto"}}}},"responses":{"201":{"description":"Sub organization Created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create sub organization","tags":["Organizations"]}},"/organization/{id}":{"delete":{"description":"Deletes the specified sub organization under the main organization associated with the API key","operationId":"OrganizationPublicController_deleteSubOrganizationById","parameters":[{"name":"id","required":true,"in":"path","description":"Id of the sub organization as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"Sub organization deleted successfully."},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Delete sub organization by ID","tags":["Organizations"]}},"/organization/sip":{"post":{"operationId":"OrganizationPublicController_createSipCarrier","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SipCarrierCreatePublicDto"}}}},"responses":{"201":{"description":"SIP carrier Created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create a SIP carrier","tags":["Organizations"]}},"/organization/sip-list":{"get":{"operationId":"OrganizationPublicController_getSipList","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get list of SIP connections","tags":["Organizations"]}},"/organization/{sipId}/phone-number":{"post":{"operationId":"OrganizationPublicController_addPhoneNumbers","parameters":[{"name":"sipId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPhoneNumbersDto"}}}},"responses":{"201":{"description":"phone number Created successfully."},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Add a phone number","tags":["Organizations"]}},"/organization/set-recording-retention":{"post":{"description":"Sets the retention period in days for call recordings associated with the organization. Optionally applies to subaccounts.","operationId":"OrganizationPublicController_setCallRecordingRetention","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"Retention period set successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Set call recording retention period","tags":["Organizations"]}},"/voices":{"get":{"operationId":"VoicePublicController_getVoices","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"List of voices for the organization","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VoicePublicDto"}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get all voices for the current organization","tags":["Voices"]},"post":{"operationId":"VoicePublicController_createVoice","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"description":"Payload for creating a new voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceCreatePublicZodDto"}}}},"responses":{"200":{"description":"Array of newly created Voice objects","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VoicePublicDto"}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create a new voice","tags":["Voices"]}},"/voices/voice-clone":{"post":{"operationId":"VoicePublicController_cloneVoice","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":5,"description":"Name of the voice"},"description":{"type":"string","description":"Description of the voice"},"providerType":{"type":"string","enum":["ELEVENLABS","CARTESIA","GOOGLE_CLOUD"],"description":"The voice provider type"},"ttsModel":{"type":"string","example":"eleven_v4_turbo","description":"TTS model of the voice. Requires providerType"},"supportedLocales":{"type":"array","items":{"type":"string","enum":["en-US","en-GB","en-AU","en-CA","en-IE","en-IN","en-NZ","en-ZA","en-SG","es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","fr-FR","pt-BR","pt-PT","zh-CN","cmn-EN","nl-NL","fi-FI","de-DE","de-AT","de-CH","de-LU","de-LI","gsw-CH","gsw-LI","el-GR","hi-IN","en-TA","id-ID","it-IT","ja-JP","ko-KR","ms-MY","en-MS","ro-RO","ru-RU","kk-KZ","uk-UA","ka-GE","bg-BG","cs-CZ","da-DK","pl-PL","sk-SK","sv-SE","tr-TR","ar-SA","ary-MA","arz-EG","apc-LB","apc-SY","apc-PS","apc-JO","acm-IQ","ar-AE","afb-AE","afb-BH","afb-KW","afb-QA","afb-OM","hr-HR","hr-BA","he-IL","ur-PK","hu-HU","fil-PH","tl","th-TH","vi-VN"]},"default":["en-US"],"description":"Supported locales for the voice"},"subAccounts":{"type":"boolean","default":false,"description":"Flag indicating whether sub-accounts are enabled"},"stability":{"type":"number","minimum":0,"maximum":1,"description":"Stability value between 0 and 1"},"similarityBoost":{"type":"number","minimum":0,"maximum":1,"description":"Similarity boost value between 0 and 1"},"speed":{"type":"number","minimum":-1,"maximum":1,"description":"Normalized speed between -1.0 (slowest) and 1.0 (fastest). 0 = normal, negative = slower, positive = faster"},"supportsAllLanguages":{"type":"boolean","default":false,"description":"Flag indicating whether this voice supports all languages"},"files":{"type":"array","items":{"type":"string","format":"binary"},"description":"Audio files for voice cloning"}},"required":["name","files"]}}}},"responses":{"200":{"description":"Array of cloned Voice objects","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VoicePublicDto"}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Clone a new voice from audio samples","tags":["Voices"]}},"/voices/{id}":{"put":{"operationId":"VoicePublicController_updateVoice","parameters":[{"name":"id","required":true,"in":"path","description":"ID of the voice to update","schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"description":"Payload for updating the voice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoiceUpdatePublicZodDto"}}}},"responses":{"200":{"description":"The updated Voice object","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicePublicDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Update an existing voice by its ID","tags":["Voices"]},"delete":{"operationId":"VoicePublicController_deleteVoice","parameters":[{"name":"id","required":true,"in":"path","description":"ID of the voice to delete","schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"Voice has been deleted"},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Delete a voice by its ID","tags":["Voices"]}},"/voices/clone-files/retention":{"put":{"operationId":"VoicePublicController_setVoiceCloneFilesRetention","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"tags":["Voices"]}},"/call/{sessionId}/warm-transfer-summary":{"post":{"description":"Plays the warm transfer summary for the specified call and his child. (Only for calls made through SIP)","operationId":"CallPublicController_playWarmTransferSummary","parameters":[{"name":"sessionId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarmTransferPublicDto"}}}},"responses":{"200":{"description":"Warm transfer summary played successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Play warm transfer summary","tags":["Calls"]}},"/contacts/{contactId}/memories":{"post":{"description":"Creates a new memory item for the specified contact","operationId":"ContactMemoryPublicController_createByContactId","parameters":[{"name":"contactId","required":true,"in":"path","description":"Contact ID","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactMemoryPublicDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/ContactMemoryPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create memory for contact","tags":["Contact Memory"]},"get":{"description":"Retrieves all memory items for the specified contact. Optionally filter by status.","operationId":"ContactMemoryPublicController_findByContactId","parameters":[{"name":"contactId","required":true,"in":"path","description":"Contact ID","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by memory status","schema":{"enum":["ACTUAL","OUTDATED","DELETED"],"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactMemoryPublicDto"}}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get memories for contact","tags":["Contact Memory"]},"delete":{"description":"Soft deletes all memory items for the specified contact by marking their status as DELETED.","operationId":"ContactMemoryPublicController_deleteByContactId","parameters":[{"name":"contactId","required":true,"in":"path","description":"Contact ID","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"count":{"type":"number","description":"Number of deleted memories"}}}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Delete all memories for contact","tags":["Contact Memory"]}},"/campaigns/{campaignId}/contacts/{phoneNumber}/memories":{"post":{"description":"Creates a new memory item for a contact identified by campaign and phone number","operationId":"ContactMemoryPublicController_createByCampaignAndPhone[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Campaign ID","schema":{"type":"string"}},{"name":"phoneNumber","required":true,"in":"path","description":"Contact phone number (5-15 digits, optional + prefix)","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactMemoryPublicDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/ContactMemoryPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create memory for campaign contact by phone number","tags":["Contact Memory"]},"get":{"description":"Retrieves all memory items for a contact identified by campaign and phone number. Optionally filter by status.","operationId":"ContactMemoryPublicController_findByCampaignAndPhone[1]","parameters":[{"name":"campaignId","required":true,"in":"path","description":"Campaign ID","schema":{"type":"string"}},{"name":"phoneNumber","required":true,"in":"path","description":"Contact phone number (5-15 digits, optional + prefix)","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by memory status","schema":{"enum":["ACTUAL","OUTDATED","DELETED"],"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactMemoryPublicDto"}}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get memories for campaign contact by phone number","tags":["Contact Memory"]}},"/memories/{memoryId}":{"patch":{"description":"Updates the text of an existing memory. This creates a new version and marks the old one as OUTDATED.","operationId":"ContactMemoryPublicController_update","parameters":[{"name":"memoryId","required":true,"in":"path","description":"Memory ID","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateContactMemoryPublicDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/ContactMemoryPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"409":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Update memory","tags":["Contact Memory"]},"delete":{"description":"Soft deletes a memory item by marking its status as DELETED.","operationId":"ContactMemoryPublicController_delete","parameters":[{"name":"memoryId","required":true,"in":"path","description":"Memory ID","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/ContactMemoryPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Delete memory","tags":["Contact Memory"]}},"/background-noise":{"get":{"description":"Returns built-in preset background sounds together with sounds uploaded by the current organization.","operationId":"BackgroundNoisePublicController_list","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"List of background sounds available to the organization","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BackgroundNoisePublicDto"}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"List background sounds","tags":["Background Noises"]},"post":{"description":"Uploads an MP3 file as a background sound for the current organization.","operationId":"BackgroundNoisePublicController_upload","parameters":[{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"Display name for the background sound"},"file":{"type":"string","format":"binary","description":"MP3 file (max 10 MB)"}},"required":["name","file"]}}}},"responses":{"200":{"description":"The created background sound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackgroundNoisePublicDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Upload a background sound","tags":["Background Noises"]}},"/background-noise/{id}":{"put":{"description":"Updates the display name of an uploaded background sound. Preset background sounds cannot be edited.","operationId":"BackgroundNoisePublicController_rename","parameters":[{"name":"id","required":true,"in":"path","description":"ID of the background sound to rename","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"description":"New display name for the background sound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackgroundNoiseUpdateZodDto"}}}},"responses":{"200":{"description":"The renamed background sound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackgroundNoisePublicDto"}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Rename a background sound","tags":["Background Noises"]},"delete":{"description":"Deletes an uploaded background sound and unlinks it from any campaigns that were referencing it. Preset background sounds cannot be deleted.","operationId":"BackgroundNoisePublicController_delete","parameters":[{"name":"id","required":true,"in":"path","description":"ID of the background sound to delete","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"204":{"description":"The background sound was deleted and unlinked from any referencing campaigns."},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Delete a background sound","tags":["Background Noises"]}},"/agents/{agentId}":{"put":{"description":"Replaces the complete writable agent configuration using the same relaxed, defaulted schema as agent creation. No phone number or voice is inferred from the organization. Omitted fields return to their schema defaults, supplied arrays replace existing arrays, empty arrays clear them, and null clears nullable fields. Use PATCH instead when changing only name, phoneNumbers, or webhooks. Lifecycle state is preserved unless the agent is changed to a trigger agent, which activates immediately. Ownership, audit, generated credentials, and provider-managed fields are preserved by the server.","operationId":"CampaignPublicController_replaceCampaign[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"ID of the agent to replace","schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentReplaceExternalDto"},"examples":{"callAgent":{"summary":"Call agent with a custom script","value":{"name":"Customer follow-up calls","type":"CALL","isIncoming":false,"callParams":{"voice":"507f1f77bcf86cd799439011","phonesFrom":["+14155552671"],"language":"en-US","timezone":"America/New_York"},"steps":[{"id":"greeting","type":"OTHER","template":"Hello {{name}}, how can I help?","meeting":null,"description":null}]}}}}}},"responses":{"200":{"description":"Agent configuration replaced successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/AgentExternalPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - feature is currently disabled","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Replace agent configuration","tags":["Agents"]},"get":{"description":"Get a single agent by its ID. Returns a AgentPublicDto.","operationId":"CampaignPublicController_getCampaign[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/AgentExternalPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get an agent by ID","tags":["Agents"]},"patch":{"description":"Partially updates the specified agent fields","operationId":"CampaignPublicController_update[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"ID of the agent to update","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignUpdatePublicDto"},"examples":{"rename":{"summary":"Rename an agent","value":{"name":"Updated customer follow-up calls"}},"replacePhoneNumbers":{"summary":"Replace assigned call phone numbers","value":{"phoneNumbers":["+14155552671"]}},"clearWebhooks":{"summary":"Remove all agent webhooks","value":{"webhooks":[]}}}}}},"responses":{"200":{"description":"Agent updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - feature is currently disabled","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Update agent","tags":["Agents"]},"delete":{"description":"Archives the agent and cleans up its active workflows and provider configuration. Agent data and related records are retained.","operationId":"CampaignPublicController_deleteCampaign[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"ID of the agent to archive","schema":{"type":"string","pattern":"^[0-9a-fA-F]{24}$"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"Agent archived successfully","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"success":{"type":"boolean"}}}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"503":{"description":"Service Unavailable - feature is currently disabled","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Delete an agent","tags":["Agents"]}},"/agents/{agentId}/start":{"post":{"description":"Activates the specified agent","operationId":"CampaignPublicController_startCampaign[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Start agent","tags":["Agents"]}},"/agents/{agentId}/stop":{"post":{"description":"Deactivates the specified agent","operationId":"CampaignPublicController_stopCampaign[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Stop agent","tags":["Agents"]}},"/agents/{agentId}/update/interestcriteria":{"post":{"description":"Updates the interest criteria of the specified agent","operationId":"CampaignPublicController_updateInterestCriteria[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignInterestCriteriaZodDto"}}}},"responses":{"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Update interest criteria","tags":["Agents"]}},"/agents/{agentId}/contacts":{"post":{"description":"Adds a contact to the specified agent. Optionally fixes US phone numbers by adding a leading 1 if not present. Returns 400 with detailed error message if phone number validation fails.","operationId":"CampaignPublicController_createContact[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"fixUSPhoneNumber","required":false,"in":"query","description":"Will add 1 to the phone number if it doesn't starts with 1","schema":{"type":"boolean"}},{"name":"ignorePhoneNumberValidation","required":false,"in":"query","description":"Skip phone number validation for contacts","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignContactCreateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSingleContactResponseDto"}}}},"400":{"description":"Bad Request - validation failed. The error message includes detailed information about which fields failed validation (e.g., \"phoneNumber: Phone number is not valid: 225747466045\"). Invalid `data` returns one issue per broken rule in `data`, each with a machine-readable `params.code` (`data_too_large`, `too_many_keys`, `key_too_long`, `invalid_key`, `invalid_characters`).","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}},"example":{"status":"error","message":"Validation failed","data":[{"code":"custom","path":["data"],"message":"total size 7,860 characters (max 4,000; largest: contactDataDescription 7,725, notes 310, email 24)","params":{"code":"data_too_large","totalLength":7860,"max":4000,"largestFields":[{"key":"contactDataDescription","length":7725},{"key":"notes","length":310},{"key":"email","length":24}]}},{"code":"custom","path":["data"],"message":"field name \"first name\" is invalid (must start with a letter, $ or _ and contain only letters, numbers, $ or _)","params":{"code":"invalid_key","key":"first name"}},{"code":"custom","path":["data"],"message":"field \"notes\" contains control character U+000B (allowed: tab, line breaks)","params":{"code":"invalid_characters","key":"notes","codePoint":"U+000B"}}]}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create a contact for an agent","tags":["Contacts"]},"delete":{"description":"Archives all contacts associated with a given agent ID","operationId":"CampaignPublicController_archiveContactsByCampaignId[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactZodDto"},"examples":{"withReason":{"value":{"archiveReason":"No longer relevant"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"archivedCount":{"type":"number"}}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive all agent contacts","tags":["Contacts"]},"get":{"description":"Get all agent contacts. Returns an array of ContactPublicDto. Supports pagination, status filtering and sorting options.","operationId":"CampaignPublicController_getCampaignContacts[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"lastAttemptTo","required":false,"in":"query","description":"Filter contacts up to this last attempt date in ISO 8601 UTC format (e.g. YYYY-MM-DDTHH:mm:ss.sssZ). Default is null.","schema":{"type":"string"}},{"name":"lastAttemptFrom","required":false,"in":"query","description":"Filter contacts from this last attempt date in ISO 8601 UTC format (e.g. YYYY-MM-DDTHH:mm:ss.sssZ). Default is null.","schema":{"type":"string"}},{"name":"archived","required":false,"in":"query","description":"Archived filter. Default is false.","schema":{"type":"boolean"}},{"name":"sortDirection","required":false,"in":"query","description":"Sorting direction. Default is ascending. Possible values: 'asc' or 'desc'.","schema":{"type":"string"}},{"name":"sortAttribute","required":false,"in":"query","description":"Sorting attribute. Name of the entity field to sort by.","schema":{"type":"string"}},{"name":"goals","required":false,"in":"query","description":"Goals filter. Default is all goals.","schema":{"type":"string"}},{"name":"statuses","required":false,"in":"query","description":"Status filter. Default is all statuses.","schema":{"type":"string"}},{"name":"perPage","required":false,"in":"query","description":"Max page size. Default is 50.","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number. Default is 0.","schema":{"type":"number"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentContactExternalDto"}}}}}},"security":[{"Authorization":[]}],"summary":"Get all contacts by agent ID","tags":["Contacts"]}},"/agents/{agentId}/contacts/bulk":{"post":{"description":"Adds contacts to the specified agent. Optionally fixes US phone numbers by adding a leading 1 if not present.","operationId":"CampaignPublicController_createContacts[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"fixUSPhoneNumber","required":false,"in":"query","description":"Will add 1 to the phone number if it doesn't starts with 1","schema":{"type":"boolean"}},{"name":"verbose","required":false,"in":"query","description":"When true, returns detailed contact information including phone numbers and status (created/updated) for each contact. Default is false (returns only contact IDs)","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkContactsCreateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/createMultipleContactsResponseDto"}}}},"400":{"description":"Bad Request - validation failed. Invalid `data` on any contact rejects the whole request; each broken rule is reported in `data` with its contact index in `path` and a machine-readable `params.code`.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}},"example":{"status":"error","message":"Validation failed","data":[{"code":"custom","path":["data"],"message":"total size 7,860 characters (max 4,000; largest: contactDataDescription 7,725, notes 310, email 24)","params":{"code":"data_too_large","totalLength":7860,"max":4000,"largestFields":[{"key":"contactDataDescription","length":7725},{"key":"notes","length":310},{"key":"email","length":24}]}},{"code":"custom","path":["data"],"message":"field name \"first name\" is invalid (must start with a letter, $ or _ and contain only letters, numbers, $ or _)","params":{"code":"invalid_key","key":"first name"}},{"code":"custom","path":["data"],"message":"field \"notes\" contains control character U+000B (allowed: tab, line breaks)","params":{"code":"invalid_characters","key":"notes","codePoint":"U+000B"}}]}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create contacts for an agent","tags":["Contacts"]},"delete":{"description":"Archive contacts associated with a given contact IDs array","operationId":"CampaignPublicController_archiveContactsByIds[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactsZodDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"archivedCount":{"type":"number"}}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive contacts by contact IDs","tags":["Contacts"]}},"/agents/{agentId}/contacts/phone-number/bulk":{"delete":{"description":"Archive contacts associated with a given contact phone numbers array","operationId":"CampaignPublicController_archiveContactsByPhoneNumbers[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"fixUSPhoneNumber","required":false,"in":"query","description":"Will add 1 to the phone number if it doesn't starts with 1","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"description":"Accepts a phone-number array or an object with phoneNumbers and an optional archiveReason.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactsByPhoneNumbersZodDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"object","properties":{"archivedCount":{"type":"number"}}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive contacts by contact phone numbers","tags":["Contacts"]}},"/agents/{agentId}/contacts/{contactId}":{"delete":{"operationId":"CampaignPublicController_archiveContactById[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactZodDto"},"examples":{"withReason":{"value":{"archiveReason":"No longer relevant"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"boolean"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive contact by contact ID","tags":["Contacts"]},"get":{"description":"Get agent contact. Returns an object with the contact","operationId":"CampaignPublicController_getCampaignContactById[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","description":"Id of the contact as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentContactExternalDto"}}}}},"security":[{"Authorization":[]}],"summary":"Get a contact by ID.","tags":["Contacts"]}},"/agents/{agentId}/contacts/phoneNumber/{phoneNumber}":{"delete":{"description":"Archive contact associated with a given contact phone number.","operationId":"CampaignPublicController_archiveContactByPhoneNumber[0]","parameters":[{"name":"agentId","required":true,"in":"path","schema":{"type":"string"}},{"name":"phoneNumber","required":true,"in":"path","schema":{"type":"string"}},{"name":"fixUSPhoneNumber","required":false,"in":"query","description":"Will add 1 to the phone number if it doesn't starts with 1","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArchiveContactZodDto"},"examples":{"withReason":{"value":{"archiveReason":"No longer relevant"}}}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"boolean"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Archive a contact by phone number","tags":["Contacts"]}},"/agents/{agentId}/contacts/{contactId}/calls":{"get":{"description":"Get all calls by agent id and contact id. Returns an array of PaginatedCallPublicDto. Supports pagination.","operationId":"CampaignPublicController_getCampaignContactCalls[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"contactId","required":true,"in":"path","description":"Id of the contact as a string ObjectId value.","schema":{"type":"string"}},{"name":"perPage","required":false,"in":"query","description":"Max page size. Default is 50.","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number. Default is 0.","schema":{"type":"number"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPaginatedCallExternalDto"}}}}},"security":[{"Authorization":[]}],"summary":"Get calls by agent ID and contact ID","tags":["Calls"]}},"/agents/{agentId}/calls":{"get":{"description":"Get all calls by agent ID. Returns an array of CallPublicDto. Supports pagination.","operationId":"CampaignPublicController_getCampaignCalls[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","description":"Page number. Default is 0.","schema":{"type":"number"}},{"name":"perPage","required":false,"in":"query","description":"Max page size. Default is 50.","schema":{"type":"number"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"default":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AgentCallExternalDto"}}}}}},"security":[{"Authorization":[]}],"summary":"Get all calls by agent ID","tags":["Calls"]}},"/agents/{agentId}/calls/{callId}/webhook-payload":{"get":{"operationId":"CampaignPublicController_getCampaignCallWebhookPayload[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","description":"Id of the call as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":""}},"security":[{"Authorization":[]}],"summary":"Get call webhook payload by agent ID and call ID","tags":["Webhooks"]}},"/agents/{agentId}/report":{"get":{"description":"Get a report of contacts organized by statuses, with an optional archived filter","operationId":"CampaignPublicController_getCampaignReport[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"archived","required":false,"in":"query","description":"Archived filter for getting the report of archived contacts. Default is false.","schema":{"type":"boolean"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"default":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicCampaignReportDto"}}}}},"security":[{"Authorization":[]}],"summary":"Get contacts report by status","tags":["Contacts"]}},"/agents/{agentId}/webhook/subscribe":{"post":{"description":"Add a new webhook to the specified agent.","operationId":"CampaignPublicController_subscribeWebhook[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"The agent ObjectId as a string.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicWebhooksZodDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"boolean"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"403":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Subscribe a Webhook","tags":["Webhooks"]}},"/agents/{agentId}/calls/{callId}/recording":{"get":{"description":"Get a URL for accessing the recording of a call associated with a given agent","operationId":"CampaignPublicController_getCallRecordingUrl[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","description":"Id of the call as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}},"default":{"description":"URL for the call recording.","content":{"application/json":{"schema":{"type":"string"}}}}},"security":[{"Authorization":[]}],"summary":"Get call recording URL","tags":["Calls"]}},"/agents/{agentId}/calls/{callId}/pcap":{"get":{"description":"Downloads the PCAP (packet capture) file containing SIP signaling traces for a call. Only available for SIP (Jambonz) calls. The PCAP data is only retained for recent calls.","operationId":"CampaignPublicController_getCallPcap[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","description":"Id of the call as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"PCAP file binary data.","content":{"application/vnd.tcpdump.pcap":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Download call PCAP file","tags":["Calls"]}},"/agents/{agentId}/calls/{callId}/setStatus":{"post":{"description":"Sets the status of the given call of the given agent","operationId":"CampaignPublicController_setCallStatus[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Id of the agent as a string ObjectId value.","schema":{"type":"string"}},{"name":"callId","required":true,"in":"path","description":"Id of the call as a string ObjectId value.","schema":{"type":"string"}},{"name":"callStatus","required":true,"in":"query","description":"New status to set for the given call","schema":{"$ref":"#/components/schemas/CallApiStatus"}},{"name":"callReachedGoal","required":true,"in":"query","description":"New reached success criteria status for the given call","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":""}},"security":[{"Authorization":[]}],"summary":"Update call status","tags":["Calls"]}},"/agents/{agentId}/duplicate":{"post":{"description":"Creates a new agent by duplicating the given agent. You can optionally provide a new name or a target organization.","operationId":"CampaignPublicController_duplicateCampaign[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"ID of the agent to duplicate as a valid ObjectId string","schema":{"type":"string"}},{"name":"name","required":false,"in":"query","description":"Name for the duplicated agent","schema":{"type":"string"}},{"name":"toOrganizationId","required":false,"in":"query","description":"Optional ID of a sub-organization to which the agent should be duplicated","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"201":{"description":""}},"security":[{"Authorization":[]}],"summary":"Duplicate an agent","tags":["Agents"]}},"/agents/{agentId}/vocabulary":{"get":{"description":"Returns all STT vocabulary entries for the agent.","operationId":"CampaignPublicController_getVocabulary[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"Vocabulary entries retrieved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"vocabulary":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"sounds_like":{"type":"array","items":{"type":"string"}}}}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get vocabulary entries","tags":["Agents","Vocabulary"]},"post":{"description":"Adds or updates STT vocabulary entries for the agent. Entries are merged by content — new entries with the same content overwrite existing ones.","operationId":"CampaignPublicController_uploadVocabulary[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadVocabularyPublicDto"}}}},"responses":{"200":{"description":"Vocabulary entries uploaded successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"totalCount":{"type":"number"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Upload vocabulary entries","tags":["Agents","Vocabulary"]},"put":{"description":"Updates STT vocabulary entries that already exist on the agent. Entries whose content does not match any existing entry are ignored.","operationId":"CampaignPublicController_updateVocabulary[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadVocabularyPublicDto"}}}},"responses":{"200":{"description":"Existing vocabulary entries updated","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"updatedCount":{"type":"number"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Update existing vocabulary entries","tags":["Agents","Vocabulary"]},"delete":{"description":"Removes all STT vocabulary entries from the agent.","operationId":"CampaignPublicController_clearVocabulary[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"All vocabulary entries cleared","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Clear all vocabulary entries","tags":["Agents","Vocabulary"]}},"/agents/{agentId}/vocabulary/remove":{"post":{"description":"Removes STT vocabulary entries whose content matches the provided words.","operationId":"CampaignPublicController_removeVocabularyWords[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"ID of the agent","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoveVocabularyWordsPublicDto"}}}},"responses":{"200":{"description":"Matching vocabulary entries removed","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"removedCount":{"type":"number"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Remove specific vocabulary entries","tags":["Agents","Vocabulary"]}},"/agent-groups/{agentGroupId}":{"get":{"description":"Returns a single agent group, scoped to the authenticated organization. Returns 404 if the agent group does not exist within the organization.","operationId":"CampaignGroupPublicController_getCampaignGroupById[0]","parameters":[{"name":"agentGroupId","required":true,"in":"path","description":"Id of the agent group as a string ObjectId value.","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignGroupPublicDto"}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get an agent group by id","tags":["Agent Groups"]}},"/agents/{agentId}/contacts/{phoneNumber}/memories":{"post":{"description":"Creates a new memory item for a contact identified by campaign and phone number","operationId":"ContactMemoryPublicController_createByCampaignAndPhone[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Campaign ID","schema":{"type":"string"}},{"name":"phoneNumber","required":true,"in":"path","description":"Contact phone number (5-15 digits, optional + prefix)","schema":{"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateContactMemoryPublicDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/ContactMemoryPublicDto"}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Create memory for campaign contact by phone number","tags":["Contact Memory"]},"get":{"description":"Retrieves all memory items for a contact identified by campaign and phone number. Optionally filter by status.","operationId":"ContactMemoryPublicController_findByCampaignAndPhone[0]","parameters":[{"name":"agentId","required":true,"in":"path","description":"Campaign ID","schema":{"type":"string"}},{"name":"phoneNumber","required":true,"in":"path","description":"Contact phone number (5-15 digits, optional + prefix)","schema":{"type":"string"}},{"name":"status","required":false,"in":"query","description":"Filter by memory status","schema":{"enum":["ACTUAL","OUTDATED","DELETED"],"type":"string"}},{"name":"x-sub-organization-id","in":"header","schema":{"type":"string"},"description":"Optional sub organization ID. Must belong to your main organization API key."}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/ContactMemoryPublicDto"}}}}}}},"400":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object"}}}}}}},"404":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"message":{"type":"string"}}}}}}},"security":[{"Authorization":[]}],"summary":"Get memories for campaign contact by phone number","tags":["Contact Memory"]}}},"info":{"title":"Callers API","description":"API documentation for Callers, providing endpoints for seamless integration.","version":"1.0.0","contact":{}},"tags":[],"servers":[{"url":"https://api.callers.ai"}],"components":{"securitySchemes":{"Authorization":{"type":"apiKey","in":"header","name":"Authorization"},"X-Sync-Secret":{"type":"apiKey","in":"header","name":"X-Sync-Secret"}},"schemas":{"CampaignCallParamsPublicDto":{"type":"object","properties":{"phonesFrom":{"description":"The array of the available phone numbers.","type":"array","items":{"type":"string"}},"timezone":{"type":"string","description":"The timezone of the campaign."},"daysOfWeek":{"description":"Days of the week the campaign is active.","type":"array","items":{"type":"string"}},"language":{"type":"string","description":"The language of the calls."},"approvedCountries":{"description":"The array of the approved countries to call.","type":"array","items":{"type":"string"}}},"required":["phonesFrom","timezone","daysOfWeek","language","approvedCountries"]},"CampaignEmailFollowUpStepPublicDto":{"type":"object","properties":{"delayValue":{"type":"number","description":"The wait time before this follow-up fires, counted from the previous send."},"delayUnit":{"type":"string","description":"The unit for delayValue.","enum":["min","hour","day"]},"contentMode":{"type":"string","description":"Whether this follow-up sends a fixed template or an AI-drafted message.","enum":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"]},"body":{"type":"string","description":"The template body, used when contentMode is HUMAN_TEMPLATE."},"prompt":{"type":"string","description":"The AI prompt, used when contentMode is AI_TEMPLATE."}},"required":["delayValue","delayUnit","contentMode"]},"CampaignEmailParamsPublicDto":{"type":"object","properties":{"outboundConnectionIds":{"description":"IDs of outbound email connections used for sending.","type":"array","items":{"type":"string"}},"inboundConnectionIds":{"description":"IDs of inbound email connections used for receiving replies.","type":"array","items":{"type":"string"}},"emailSelectionStrategy":{"type":"string","description":"The strategy for selecting outbound email connections when more than one is configured.","enum":["ROTATE","RANDOM","FIXED"]},"signature":{"type":"string","description":"The email signature HTML content."},"signatureName":{"type":"string","description":"The display name for the email signature."},"defaultSubject":{"type":"string","description":"The default subject line for emails."},"timezone":{"type":"string","description":"The timezone of the email campaign."},"followUpSteps":{"description":"The ordered list of follow-up steps to send when there is no reply.","type":"array","items":{"$ref":"#/components/schemas/CampaignEmailFollowUpStepPublicDto"}},"followUpRespectSchedule":{"type":"boolean","description":"Whether follow-up sends respect the campaign availability schedule."},"followUpOnlyIfNoReply":{"type":"boolean","description":"Whether follow-ups stop once the contact has ever replied, rather than continuing on cadence regardless."},"fallbackEnabled":{"type":"boolean","description":"Whether fallback behavior is enabled."},"retryFollowUp":{"type":"boolean","description":"Whether to retry follow-up emails."}},"required":["outboundConnectionIds","inboundConnectionIds","emailSelectionStrategy","followUpSteps","followUpRespectSchedule","followUpOnlyIfNoReply","fallbackEnabled","retryFollowUp"]},"AgentExternalPublicDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the campaign. string representation of a ObjectId."},"name":{"type":"string","description":"The name of the campaign."},"active":{"type":"boolean","description":"Whether the campaign is active (running). Derived from the campaign active field."},"pauseNewChats":{"type":"boolean","description":"Whether new chats are paused. When true, stops initiating new chats while allowing ongoing chats to complete."},"firstInteractionAt":{"type":"string","description":"The date and time of the first interaction (call or chat) in the campaign in ISO string format."},"completedAt":{"type":"string","description":"The date and time when the campaign was completed in ISO string format."},"callParams":{"description":"The call parameters of the campaign.","allOf":[{"$ref":"#/components/schemas/CampaignCallParamsPublicDto"}]},"emailParams":{"description":"The email parameters of the campaign.","allOf":[{"$ref":"#/components/schemas/CampaignEmailParamsPublicDto"}]},"organizationId":{"type":"string","description":"The id of the organization. string representation of a ObjectId."},"incomingPhoneNumber":{"type":"string","description":"The incoming phone number of the campaign."},"webhooks":{"description":"The webhook url of the campaign.","type":"array","items":{"type":"string"}},"slackUrl":{"type":"string","description":"The Slack notifications URL of the campaign."},"isIncoming":{"type":"boolean","description":"Boolean value defines if the campaign is incoming or outgoing. True if the campaign is incoming, false if the campaign is outgoing."},"variables":{"description":"List of variable used in the campaign.","type":"array","items":{"type":"string"}},"campaignGroupId":{"type":"string","description":"The id of the campaign group this campaign belongs to. Null if the campaign is not part of any group.","nullable":true},"campaignGroupName":{"type":"string","description":"The name of the campaign group this campaign belongs to. Null if the campaign is not part of any group or the group could not be resolved.","nullable":true},"agentGroupId":{"type":"string","description":"Agent-facing alias of campaignGroupId. Null if the agent is not part of a group.","nullable":true},"agentGroupName":{"type":"string","description":"Agent-facing alias of campaignGroupName. Null if the group cannot be resolved.","nullable":true}},"required":["id","name","active","firstInteractionAt","completedAt","callParams","organizationId","webhooks","slackUrl","isIncoming","variables","agentGroupId","agentGroupName"]},"TranscriptMessagePublicDto":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the message within the transcript."},"role":{"type":"string","description":"The role of the speaker."},"duration":{"type":"number","description":"The duration of the message in mils."},"timestamp":{"type":"number","description":"The timestamp of the message in mils."},"content":{"type":"string","description":"The real content of the message."}},"required":["id","role","duration","timestamp","content"]},"CallEventPublicDto":{"type":"object","properties":{"type":{"type":"string","description":"The type of the event.","enum":["SMS","MEETING","FORWARD"]},"data":{"type":"object","description":"The specific data of the event."}},"required":["type"]},"GoalPublicDto":{"type":"object","properties":{"description":{"type":"string","description":"The description of the goal"},"reached":{"type":"boolean","description":"The status of the goal. Was it reached or not."}},"required":["description","reached"]},"AgentCallExternalDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the call. string representation of a ObjectId."},"sessionId":{"type":"string","description":"The id of the session. string representation of a ObjectId."},"campaignId":{"type":"string","description":"The id of the campaign. string representation of a ObjectId."},"organizationId":{"type":"string","description":"The id of the organization. string representation of a ObjectId."},"duration":{"type":"number","description":"The duration of the call in seconds."},"hangUpReason":{"type":"string","description":"The reason for hanging up the call."},"status":{"type":"string","description":"The status of the call."},"failedReason":{"type":"string","description":"The reason of the failing call."},"failedReasonDetails":{"type":"string","description":"The reason details of the failed call."},"recordingUrl":{"type":"string","description":"The url of the recording."},"createdAt":{"type":"string","description":"The datetime the call object was created in ISO string format.","example":"2021-09-01T00:00:00.000Z"},"updatedAt":{"type":"string","description":"The datetime the call was updated last time in ISO string format.","example":"2021-09-01T00:00:00.000Z"},"phoneFrom":{"type":"string","description":"The phone number."},"phoneTo":{"type":"string","description":"The phone number."},"messages":{"description":"The ordered messages of the call.","type":"array","items":{"$ref":"#/components/schemas/TranscriptMessagePublicDto"}},"contactId":{"type":"string","description":"Id of the contact within the system. String representation of a ObjectId."},"summary":{"type":"object","description":"The summary object of the call."},"events":{"description":"The scripted events that successfully occurred during the call.","type":"array","items":{"$ref":"#/components/schemas/CallEventPublicDto"}},"goal":{"description":"The goal object of the call.","allOf":[{"$ref":"#/components/schemas/GoalPublicDto"}]},"promptVars":{"type":"object","description":"Prompt variables associated with the call"},"twilioAccountSid":{"type":"string","description":"Twilio account sid."},"incomingCall":{"type":"boolean","description":"This boolean value indicates the call direction: true for incoming calls and false for outgoing calls."},"web":{"type":"boolean","description":"Indicates whether the call was initiated via the web SDK."},"agentId":{"type":"string","description":"The agent ID. Alias of campaignId."}},"required":["id","sessionId","campaignId","organizationId","duration","hangUpReason","status","failedReason","failedReasonDetails","recordingUrl","createdAt","updatedAt","phoneFrom","phoneTo","messages","contactId","summary","events","goal","promptVars","twilioAccountSid","incomingCall","web","agentId"]},"AgentContactExternalDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the contact. string representation of a ObjectId."},"name":{"type":"string","description":"The name of the contact."},"phoneNumber":{"type":"string","description":"The phone number of the contact."},"campaignId":{"type":"string","description":"The id of the campaign. string representation of a ObjectId."},"status":{"type":"string","description":"The status of the contact."},"attempts":{"type":"number","description":"The total number of call attempts made to reach the contact."},"failedReason":{"type":"string","description":"The reason for failing the call."},"failedReasonDetails":{"type":"string","description":"The reason details for failing the call."},"createdAt":{"type":"string","description":"The date and time the contact was created in ISO format."},"lastAttempt":{"type":"string","description":"The date and time of the last call attempt in ISO format."},"agentId":{"type":"string","description":"The agent ID. Alias of campaignId."}},"required":["id","name","phoneNumber","campaignId","status","attempts","createdAt","lastAttempt","agentId"]},"AgentPaginatedCallExternalDto":{"type":"object","properties":{"data":{"description":"Array of agent call objects.","type":"array","items":{"$ref":"#/components/schemas/AgentCallExternalDto"}},"total":{"type":"number","description":"Total number of records."},"page":{"type":"number","description":"Current page number."},"perPage":{"type":"number","description":"Number of records per page."}},"required":["data","total","page","perPage"]},"AgentCreateExternalDto":{"type":"object","properties":{"name":{"description":"Human-readable campaign name. Minimum 3 characters.","type":"string","minLength":3},"steps":{"description":"Legacy flat script steps. Use this or nestedSteps; omitted scripts receive the standard starter step.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string","enum":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"],"x-enumNames":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"]},"template":{"type":"string","default":""},"title":{"type":"string","nullable":true},"meeting":{"type":"object","properties":{"eventTypeId":{"type":"string","nullable":true},"daysAhead":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":60,"exclusiveMaximum":false,"nullable":true},"noSlotsStrategy":{"type":"string","nullable":true},"noSlotsFallbackText":{"type":"string","nullable":true}},"required":["daysAhead"],"nullable":true},"description":{"type":"string","nullable":true},"data":{"type":"object","properties":{"template":{"type":"string","minLength":1,"nullable":true},"incomingTemplate":{"type":"string","minLength":1,"nullable":true,"default":"Hi {{ name }}! How are you doing today?"},"phoneNumberType":{"type":"string","enum":["Phone Number","Contact Field","SIP URI","Human Agent Queue"],"x-enumNames":["PHONE_NUMBER","CONTACT_FIELD","SIP_URI","HUMAN_AGENT_QUEUE"],"default":"Phone Number","nullable":true},"phoneNumber":{"type":"string","nullable":true},"humanAgentQueueId":{"type":"string","minLength":1,"nullable":true},"contactAsCallerId":{"type":"boolean","default":false,"nullable":true},"warmTransfer":{"type":"boolean","default":false,"nullable":true},"warmTransferPrompt":{"type":"string","nullable":true},"warmTransferAgentOnly":{"type":"boolean","default":true,"nullable":true},"warmTransferPlayOnDTMF":{"type":"boolean","default":false,"nullable":true},"ringTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":600,"exclusiveMaximum":false,"nullable":true},"whatsappTemplateStatus":{"type":"string","nullable":true},"whatsappTemplateName":{"type":"string","nullable":true},"sendingStrategy":{"type":"string","enum":["NODE_REACHED","AFTER_CALL"],"x-enumNames":["NODE_REACHED","AFTER_CALL"],"nullable":true,"default":"NODE_REACHED"},"functionName":{"type":"string","minLength":1,"nullable":true},"systemScenario":{"type":"string","enum":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"x-enumNames":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"nullable":true},"isBackgroundActionRun":{"type":"boolean","default":false,"nullable":true},"skipAssistantMessage":{"type":"boolean","default":false,"nullable":true},"type":{"type":"string","enum":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"x-enumNames":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"nullable":true},"formElements":{"nullable":true},"formName":{"type":"string","nullable":true},"a2uiPrompt":{"type":"string","nullable":true},"presentationMode":{"type":"string","enum":["popover","inline-card","message-bubble"],"nullable":true},"viewOnly":{"type":"boolean","nullable":true},"functionNames":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"a2aConnectionIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"waitConditionMatchMode":{"type":"string","enum":["ALL","ANY"],"x-enumNames":["ALL","ANY"],"nullable":true},"waitTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":180,"exclusiveMaximum":false,"nullable":true}},"required":["functionNames","a2aConnectionIds"],"nullable":true},"summary":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"x-enumNames":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"nullable":true,"default":"OPEN_QUESTION"},"options":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["name","options"]}},"callParams":{"type":"object","properties":{"minSilenceMsBeforeResponse":{"type":"integer","minimum":0,"exclusiveMinimum":false,"nullable":true},"detectInterruption":{"type":"boolean","default":true},"noInterruptionOnce":{"type":"boolean","default":false},"enableKeypadInput":{"type":"boolean","default":false}},"required":["minSilenceMsBeforeResponse"],"nullable":true},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true},"emailData":{"type":"object","properties":{"subject":{"type":"string","nullable":true},"body":{"type":"string","default":""},"attachments":{"nullable":true},"prompt":{"type":"string","nullable":true},"tone":{"type":"string","enum":["default","direct","formal","casual","creative","based_on_contact"],"x-enumNames":["DEFAULT","DIRECT","FORMAL","CASUAL","CREATIVE","BASED_ON_CONTACT"],"nullable":true},"contentMode":{"type":"string","enum":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"x-enumNames":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"nullable":true},"includeSignature":{"type":"boolean","nullable":true},"signatureId":{"type":"string","nullable":true},"isSubjectOverridden":{"type":"boolean","nullable":true}},"required":["prompt","tone","contentMode","includeSignature","signatureId","isSubjectOverridden"],"nullable":true}},"required":["type","meeting","description","summary","callParams","scriptUpdateRules","emailData"]},"default":[{"id":"bqUjnsC","type":"OTHER","template":"Hello, is this {{ name }} ?","meeting":null,"description":null,"data":null,"summary":[]}]},"nestedSteps":{"description":"Hierarchical script nodes containing prompts, actions, transfers, forms, and meetings.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"nestedScriptLabel":{"description":"Cosmetic, user-authored label shown above a nested-script block in the editor UI only. Not used in the generated prompt. If a node already has this value, preserve it exactly — never invent, translate, rewrite, or drop it. Omit this property entirely when it is not set.","type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string","enum":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"],"x-enumNames":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"]},"template":{"type":"string","default":""},"title":{"type":"string","nullable":true},"meeting":{"type":"object","properties":{"eventTypeId":{"type":"string","nullable":true},"daysAhead":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":60,"exclusiveMaximum":false,"nullable":true},"noSlotsStrategy":{"type":"string","nullable":true},"noSlotsFallbackText":{"type":"string","nullable":true}},"required":["daysAhead"],"nullable":true},"description":{"type":"string","nullable":true},"data":{"type":"object","properties":{"template":{"type":"string","minLength":1,"nullable":true},"incomingTemplate":{"type":"string","minLength":1,"nullable":true,"default":"Hi {{ name }}! How are you doing today?"},"phoneNumberType":{"type":"string","enum":["Phone Number","Contact Field","SIP URI","Human Agent Queue"],"x-enumNames":["PHONE_NUMBER","CONTACT_FIELD","SIP_URI","HUMAN_AGENT_QUEUE"],"default":"Phone Number","nullable":true},"phoneNumber":{"type":"string","nullable":true},"humanAgentQueueId":{"type":"string","minLength":1,"nullable":true},"contactAsCallerId":{"type":"boolean","default":false,"nullable":true},"warmTransfer":{"type":"boolean","default":false,"nullable":true},"warmTransferPrompt":{"type":"string","nullable":true},"warmTransferAgentOnly":{"type":"boolean","default":true,"nullable":true},"warmTransferPlayOnDTMF":{"type":"boolean","default":false,"nullable":true},"ringTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":600,"exclusiveMaximum":false,"nullable":true},"whatsappTemplateStatus":{"type":"string","nullable":true},"whatsappTemplateName":{"type":"string","nullable":true},"sendingStrategy":{"type":"string","enum":["NODE_REACHED","AFTER_CALL"],"x-enumNames":["NODE_REACHED","AFTER_CALL"],"nullable":true,"default":"NODE_REACHED"},"functionName":{"type":"string","minLength":1,"nullable":true},"systemScenario":{"type":"string","enum":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"x-enumNames":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"nullable":true},"isBackgroundActionRun":{"type":"boolean","default":false,"nullable":true},"skipAssistantMessage":{"type":"boolean","default":false,"nullable":true},"type":{"type":"string","enum":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"x-enumNames":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"nullable":true},"formElements":{"nullable":true},"formName":{"type":"string","nullable":true},"a2uiPrompt":{"type":"string","nullable":true},"presentationMode":{"type":"string","enum":["popover","inline-card","message-bubble"],"nullable":true},"viewOnly":{"type":"boolean","nullable":true},"functionNames":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"a2aConnectionIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"waitConditionMatchMode":{"type":"string","enum":["ALL","ANY"],"x-enumNames":["ALL","ANY"],"nullable":true},"waitTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":180,"exclusiveMaximum":false,"nullable":true}},"required":["functionNames","a2aConnectionIds"],"nullable":true},"summary":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"x-enumNames":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"nullable":true,"default":"OPEN_QUESTION"},"options":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["name","options"]}},"callParams":{"type":"object","properties":{"minSilenceMsBeforeResponse":{"type":"integer","minimum":0,"exclusiveMinimum":false,"nullable":true},"detectInterruption":{"type":"boolean","default":true},"noInterruptionOnce":{"type":"boolean","default":false},"enableKeypadInput":{"type":"boolean","default":false}},"required":["minSilenceMsBeforeResponse"],"nullable":true},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true},"emailData":{"type":"object","properties":{"subject":{"type":"string","nullable":true},"body":{"type":"string","default":""},"attachments":{"nullable":true},"prompt":{"type":"string","nullable":true},"tone":{"type":"string","enum":["default","direct","formal","casual","creative","based_on_contact"],"x-enumNames":["DEFAULT","DIRECT","FORMAL","CASUAL","CREATIVE","BASED_ON_CONTACT"],"nullable":true},"contentMode":{"type":"string","enum":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"x-enumNames":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"nullable":true},"includeSignature":{"type":"boolean","nullable":true},"signatureId":{"type":"string","nullable":true},"isSubjectOverridden":{"type":"boolean","nullable":true}},"required":["prompt","tone","contentMode","includeSignature","signatureId","isSubjectOverridden"],"nullable":true}},"required":["type","meeting","description","summary","callParams","scriptUpdateRules","emailData"]}},"incomingEntryPoint":{"description":"Marks the first subflow of an inbound-only email campaign as a graph entry point. Such nodes have no script steps — the incoming message is provided at runtime. Omit this property entirely when it is not true — do not set it to false.","type":"boolean","nullable":true},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true},"nestedScriptHead":{"description":"Marks this node as a nested script (collapsible sub-tree in the UI). If true in the current campaign, you MUST include it as true. Omit this property entirely when it is not true — do not set it to false.","type":"boolean","nullable":true}},"required":["id","title","steps","scriptUpdateRules"]},"default":[]},"edges":{"description":"Directed graph edges connecting script and nested-script nodes.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"source":{"type":"string","minLength":1},"target":{"type":"string","minLength":1},"goTo":{"type":"boolean","nullable":true,"default":false},"additionalInstructions":{"type":"string","default":"","nullable":true},"branch":{"type":"string","enum":["SUCCESS","FALLBACK"],"x-enumNames":["SUCCESS","FALLBACK"],"nullable":true}},"required":["id","source","target","additionalInstructions"]},"default":[]},"fallbacks":{"description":"Fallback behavior for silence, errors, retries, and unhandled input.","type":"array","items":{"type":"object","properties":{"input":{"type":"string","minLength":1},"output":{"oneOf":[{"type":"string","minLength":1},{"type":"array","minItems":1,"items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string","enum":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"],"x-enumNames":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"]},"template":{"type":"string","default":""},"title":{"type":"string","nullable":true},"meeting":{"type":"object","properties":{"eventTypeId":{"type":"string","nullable":true},"daysAhead":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":60,"exclusiveMaximum":false,"nullable":true},"noSlotsStrategy":{"type":"string","nullable":true},"noSlotsFallbackText":{"type":"string","nullable":true}},"required":["daysAhead"],"nullable":true},"description":{"type":"string","nullable":true},"data":{"type":"object","properties":{"template":{"type":"string","minLength":1,"nullable":true},"incomingTemplate":{"type":"string","minLength":1,"nullable":true,"default":"Hi {{ name }}! How are you doing today?"},"phoneNumberType":{"type":"string","enum":["Phone Number","Contact Field","SIP URI","Human Agent Queue"],"x-enumNames":["PHONE_NUMBER","CONTACT_FIELD","SIP_URI","HUMAN_AGENT_QUEUE"],"default":"Phone Number","nullable":true},"phoneNumber":{"type":"string","nullable":true},"humanAgentQueueId":{"type":"string","minLength":1,"nullable":true},"contactAsCallerId":{"type":"boolean","default":false,"nullable":true},"warmTransfer":{"type":"boolean","default":false,"nullable":true},"warmTransferPrompt":{"type":"string","nullable":true},"warmTransferAgentOnly":{"type":"boolean","default":true,"nullable":true},"warmTransferPlayOnDTMF":{"type":"boolean","default":false,"nullable":true},"ringTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":600,"exclusiveMaximum":false,"nullable":true},"whatsappTemplateStatus":{"type":"string","nullable":true},"whatsappTemplateName":{"type":"string","nullable":true},"sendingStrategy":{"type":"string","enum":["NODE_REACHED","AFTER_CALL"],"x-enumNames":["NODE_REACHED","AFTER_CALL"],"nullable":true,"default":"NODE_REACHED"},"functionName":{"type":"string","minLength":1,"nullable":true},"systemScenario":{"type":"string","enum":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"x-enumNames":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"nullable":true},"isBackgroundActionRun":{"type":"boolean","default":false,"nullable":true},"skipAssistantMessage":{"type":"boolean","default":false,"nullable":true},"type":{"type":"string","enum":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"x-enumNames":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"nullable":true},"formElements":{"nullable":true},"formName":{"type":"string","nullable":true},"a2uiPrompt":{"type":"string","nullable":true},"presentationMode":{"type":"string","enum":["popover","inline-card","message-bubble"],"nullable":true},"viewOnly":{"type":"boolean","nullable":true},"functionNames":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"a2aConnectionIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"waitConditionMatchMode":{"type":"string","enum":["ALL","ANY"],"x-enumNames":["ALL","ANY"],"nullable":true},"waitTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":180,"exclusiveMaximum":false,"nullable":true}},"required":["functionNames","a2aConnectionIds"],"nullable":true},"summary":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"x-enumNames":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"nullable":true,"default":"OPEN_QUESTION"},"options":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["name","options"]}},"callParams":{"type":"object","properties":{"minSilenceMsBeforeResponse":{"type":"integer","minimum":0,"exclusiveMinimum":false,"nullable":true},"detectInterruption":{"type":"boolean","default":true},"noInterruptionOnce":{"type":"boolean","default":false},"enableKeypadInput":{"type":"boolean","default":false}},"required":["minSilenceMsBeforeResponse"],"nullable":true},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true},"emailData":{"type":"object","properties":{"subject":{"type":"string","nullable":true},"body":{"type":"string","default":""},"attachments":{"nullable":true},"prompt":{"type":"string","nullable":true},"tone":{"type":"string","enum":["default","direct","formal","casual","creative","based_on_contact"],"x-enumNames":["DEFAULT","DIRECT","FORMAL","CASUAL","CREATIVE","BASED_ON_CONTACT"],"nullable":true},"contentMode":{"type":"string","enum":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"x-enumNames":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"nullable":true},"includeSignature":{"type":"boolean","nullable":true},"signatureId":{"type":"string","nullable":true},"isSubjectOverridden":{"type":"boolean","nullable":true}},"required":["prompt","tone","contentMode","includeSignature","signatureId","isSubjectOverridden"],"nullable":true}},"required":["type","meeting","description","summary","callParams","scriptUpdateRules","emailData"]}}]},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true}},"required":["input","output","scriptUpdateRules"]},"default":[]},"interestCriteria":{"type":"string","nullable":true,"default":null},"interestCriteriaV2":{"description":"Interest classification criteria. Include a non-empty value when defining a custom criterion.","type":"object","properties":{"value":{"type":"string","nullable":true},"successCriteria":{"type":"object","properties":{"interested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["INTERESTED","NOT_INTERESTED"],"x-enumNames":["INTERESTED","NOT_INTERESTED"]},"order":{"type":"number"},"default":{"type":"boolean","nullable":true},"immutable":{"type":"boolean","nullable":true}},"required":["name","description","type","order","default","immutable"]},"default":[]},"notInterested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["INTERESTED","NOT_INTERESTED"],"x-enumNames":["INTERESTED","NOT_INTERESTED"]},"order":{"type":"number"},"default":{"type":"boolean","nullable":true},"immutable":{"type":"boolean","nullable":true}},"required":["name","description","type","order","default","immutable"]},"default":[]}},"nullable":true},"updatedAt":{"oneOf":[{"type":"string"},{}],"nullable":true},"isReviewed":{"type":"boolean"}},"nullable":true},"webhookUrl":{"type":"string","nullable":true},"slackUrl":{"type":"string","nullable":true},"webhookStatuses":{"type":"array","items":{"type":"string"},"default":["INTERESTED","NOT_INTERESTED","CALL_ME_LATER","WRONG_NUMBER","DO_NOT_CALL","COMPLETED"]},"webhookEvents":{"type":"array","items":{"type":"string"},"default":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL"]},"webhooks":{"type":"array","items":{"type":"object","properties":{"catalogId":{"description":"Stable unique id for this webhook in the campaign workflow catalog.","type":"string","nullable":true},"name":{"type":"string","maxLength":30,"nullable":true},"url":{"type":"string","nullable":true},"events":{"type":"array","items":{"type":"string"},"default":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL"]},"isAdvanced":{"type":"boolean","nullable":true,"default":false},"advancedWebhook":{"type":"object","properties":{"url":{"type":"string","format":"uri","nullable":true},"method":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"x-enumNames":["GET","POST","PUT","DELETE","PATCH"],"nullable":true},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"enabled":{"type":"boolean"}},"required":["name","value"]},"nullable":true},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"enabled":{"type":"boolean"}},"required":["name","value"]},"nullable":true},"body":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"isBranded":{"type":"boolean"},"apiData":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"x-enumNames":["GET","POST","PUT","DELETE","PATCH"],"default":"GET"},"url":{"type":"string","default":""},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"default":[]},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"default":[]},"body":{"type":"string"},"outputParamsSchema":{"type":"string"},"ignoreResponse":{"type":"boolean","default":false},"useRSASignature":{"type":"boolean"},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true}},"nullable":true},"apiType":{"type":"string","enum":["EXTERNAL","ACTIVE_PIECE","SYNTHETIC_SYSTEM_API_CALL"],"x-enumNames":["EXTERNAL","ACTIVE_PIECE","SYNTHETIC_SYSTEM_API_CALL"],"default":"EXTERNAL"},"activePieceData":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectionId":{"type":"string","nullable":true},"requestData":{"default":{}},"pieceVersion":{"type":"string","nullable":true},"signRequest":{"oneOf":[{"type":"boolean"},{"type":"string"}],"nullable":true},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true},"actionId":{"type":"string","minLength":1}},"required":["id","actionId"],"nullable":true},"outputParamsSchema":{"type":"string"},"ignoreResponse":{"type":"boolean"},"testResponse":{"nullable":true},"contactMapper":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"functionDefinition":{"type":"object","properties":{"parameters":{"type":"object","properties":{"type":{"type":"string","default":"object"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"}},"required":["type","description"]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]*$"},"default":[]},"additionalProperties":{"type":"boolean","default":false}},"required":["properties"]}},"required":["parameters"],"nullable":true}},"nullable":true}}},"default":[]},"slackStatuses":{"type":"array","items":{"type":"string"},"default":["INTERESTED","NOT_INTERESTED","CALL_ME_LATER","WRONG_NUMBER","DO_NOT_CALL","COMPLETED"]},"slackEvents":{"type":"array","items":{"type":"string"},"default":[]},"isIncoming":{"description":"Whether interactions are initiated by the customer. Defaults to false.","type":"boolean","nullable":true,"default":false},"scriptVariables":{"type":"array","items":{"type":"string"},"default":[]},"scriptVariablesV2":{"description":"Typed script variables. Omit to receive direction-aware defaults.","type":"array","items":{"type":"object","properties":{"variableName":{"type":"string","minLength":1},"required":{"type":"boolean"},"source":{"type":"string","nullable":true}},"required":["variableName","required"]}},"maxIncomingSlots":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":20,"exclusiveMaximum":false,"default":2},"callParams":{"description":"Call, speech, scheduling, retry, recording, voicemail, web-call, and model settings. Nested fields use the same defaults as the UI.","type":"object","properties":{"timezone":{"type":"string","nullable":true,"default":"UTC"},"allowIncomingCalls":{"type":"boolean","default":false},"acceptWebCalls":{"type":"boolean","default":false},"webCallWorkingHoursOnly":{"type":"boolean","default":false},"webCallTheme":{"type":"object","properties":{"base":{"type":"string","enum":["light","dark"]}},"required":["base"],"nullable":true},"webCallThemeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true},"closeWidgetFormOnNextTranscriptMessage":{"type":"boolean","default":false},"detectInterruption":{"type":"boolean","default":true},"enableKeypadInput":{"type":"boolean","default":false},"flushDtmfOnHash":{"type":"boolean","default":true},"smartInterruptionDelayEnabled":{"type":"boolean","default":true},"afterInterruptionDelay":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":0.5},"detectSilence":{"type":"boolean","default":true},"detectHangup":{"type":"boolean","default":true},"retryDailyAttempts":{"type":"number","nullable":true,"default":3},"retryDailyAttemptsSchedule":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"value":{"type":"number"}},"required":["from","to","value"]},"default":[]},"detectShortSilenceSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":8},"detectHangupSilenceSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":30},"detectHangupUserRequestCount":{"type":"integer","minimum":0.01,"exclusiveMinimum":false,"default":20},"goodbyeUserRequestCount":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":4},"minSilenceMsBeforeResponse":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":1000},"voiceActivationDetection":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":10},"recognizedEventHandlingDelay":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":0},"retryAttempts":{"type":"number","default":5},"recognizedEventConfidenceThreshold":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.6},"recognizingEventConfidenceThreshold":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.5},"lowConfidenceDurationThreshold":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":250},"retryIntervalMinutes":{"type":"number","default":90},"temperature":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.25},"voice":{"type":"string","nullable":true},"phonesFrom":{"type":"array","items":{"type":"string"},"default":[]},"endTime":{"type":"string","nullable":true,"default":"17:00"},"startTime":{"type":"string","nullable":true,"default":"09:00"},"daysOfWeek":{"type":"array","items":{"oneOf":[{"type":"string","enum":["Sunday"]},{"type":"string","enum":["Monday"]},{"type":"string","enum":["Tuesday"]},{"type":"string","enum":["Wednesday"]},{"type":"string","enum":["Thursday"]},{"type":"string","enum":["Friday"]},{"type":"string","enum":["Saturday"]}]},"default":["Monday","Tuesday","Wednesday","Thursday","Friday"]},"availabilitySchedule":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"oneOf":[{"type":"string","enum":["Sunday"]},{"type":"string","enum":["Monday"]},{"type":"string","enum":["Tuesday"]},{"type":"string","enum":["Wednesday"]},{"type":"string","enum":["Thursday"]},{"type":"string","enum":["Friday"]},{"type":"string","enum":["Saturday"]}]},"timeSlots":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"string","default":"09:00"},"endTime":{"type":"string","default":"17:00"}}}}},"required":["dayOfWeek","timeSlots"]},"default":[{"dayOfWeek":"Monday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Tuesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Wednesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Thursday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Friday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]}]},"recordIncomingCall":{"type":"boolean","default":true},"recordOutgoingCall":{"type":"boolean","default":true},"stopRecordingOnTransfer":{"type":"boolean","default":false},"models":{"type":"object","properties":{"outgoingConversationModelIds":{"type":"array","items":{"type":"string"},"default":[]},"stageModelIds":{"type":"array","items":{"type":"string"},"default":[]},"voicemailModelIds":{"type":"array","items":{"type":"string"},"default":[]},"postProcessingVoicemailModelIds":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]},"prePostProcessingModelIds":{"type":"array","items":{"type":"string"},"default":[]},"pronunciationModelIds":{"type":"array","items":{"type":"string"},"default":[]},"incomingConversationModelIds":{"type":"array","items":{"type":"string"},"default":[]},"embeddingsModelIds":{"type":"array","items":{"type":"string"},"default":[]},"kbContentSplittingModelIds":{"type":"array","items":{"type":"string"},"default":[]},"warmTransferModelIds":{"type":"array","items":{"type":"string"},"default":[]},"phoneNumberPredictionsModelIds":{"type":"array","items":{"type":"string"},"default":[]}},"default":{"outgoingConversationModelIds":[],"stageModelIds":[],"voicemailModelIds":[],"postProcessingVoicemailModelIds":[],"prePostProcessingModelIds":[],"pronunciationModelIds":[],"incomingConversationModelIds":[],"embeddingsModelIds":[],"kbContentSplittingModelIds":[],"warmTransferModelIds":[],"phoneNumberPredictionsModelIds":[]}},"modelContainersSettings":{"type":"object","properties":{"outgoingConversationModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"incomingConversationModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"stageModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"voicemailModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"postProcessingVoicemailModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"prePostProcessingModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"pronunciationModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"embeddingsModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"kbContentSplittingModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"generateScriptModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"scriptProcessingModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"warmTransferModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true}},"nullable":true},"notifyRecording":{"type":"boolean","default":false},"notifyRecordingFile":{"type":"string","nullable":true},"preloadGreetingEnabled":{"type":"boolean","default":true},"preloadGreetingUninterruptible":{"type":"boolean","default":false},"ignoreUserSpeechBeforeGreeting":{"type":"boolean","default":false},"beforeGreetingTimeout":{"type":"number","minimum":1,"exclusiveMinimum":false,"nullable":true},"checkDoNotCall":{"type":"boolean","default":false},"checkStateDoNotCall":{"type":"boolean","default":false},"twilioVoiceMailDetection":{"type":"boolean","default":true},"voxiaVoiceMailDetection":{"type":"boolean","default":true},"voiceMailFallbackEnabled":{"type":"boolean","default":false},"delayBeforeVoiceMailCheckSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"default":10},"detectAiScreening":{"type":"boolean","nullable":true,"default":false},"aiScreeningResponseTimeout":{"type":"integer","minimum":1,"exclusiveMinimum":false,"nullable":true,"default":30},"screeningFallbackTTL":{"type":"integer","minimum":1,"exclusiveMinimum":false,"nullable":true,"default":30},"screeningTopics":{"type":"string","nullable":true,"default":""},"retryCallMeLater":{"type":"boolean","default":true},"language":{"type":"string","default":"en"},"locale":{"type":"string","default":"en-US"},"smsConsentRequirement":{"type":"boolean","default":false},"openaiRealtime":{"type":"boolean","default":false},"geminiRealtime":{"type":"boolean","default":false},"sttCodeSwitching":{"type":"boolean","nullable":true},"sttKeywords":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]},"sttVocabulary":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"soundsLike":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["content"]},"nullable":true,"default":[]},"ragEnabled":{"type":"boolean","default":false},"nodeReachedHandlingDelayed":{"type":"boolean","default":true},"flushUserInputBufferAfterUninterruptible":{"type":"boolean","default":true},"collapseInactiveNestedSteps":{"type":"boolean","default":false},"additionalPrompt":{"type":"string","nullable":true},"restrictionsPrompt":{"type":"string","nullable":true},"useAdditionalRulesOnly":{"type":"boolean","nullable":true,"default":false},"useForcedToolCallsOnly":{"type":"boolean","default":true},"useConversationMeetingFunction":{"type":"boolean","default":false},"voiceMailEnabled":{"type":"boolean","default":false},"voiceMailMessage":{"type":"string","nullable":true},"voiceMailWhenToLeave":{"oneOf":[{"type":"string","enum":["EVERY_TIME"]},{"type":"string","enum":["ONCE_PER_CONTACT"]},{"type":"string","enum":["LAST_ATTEMPT"]}],"default":"EVERY_TIME"},"voiceMailRephraseWithAI":{"type":"boolean","default":false},"voiceMailBeepTimeout":{"type":"integer","default":5000},"noiseReduction":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":30,"exclusiveMaximum":false,"nullable":true},"maxDuration":{"type":"integer","minimum":1,"exclusiveMinimum":false,"maximum":60,"exclusiveMaximum":false,"nullable":true,"default":30},"channel":{"type":"string","enum":["TWILIO","WHATSAPP","TELNYX","LINE","EMAIL"],"x-enumNames":["TWILIO","WHATSAPP","TELNYX","LINE","EMAIL"],"nullable":true,"default":"TWILIO"},"pronunciationDictionary":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string","minLength":1},"ipa":{"type":"string","minLength":1},"phonetic":{"type":"string","minLength":1},"native":{"type":"string","nullable":true},"selectedPlaybackType":{"type":"string","enum":["NATIVE","IPA","PHONETIC"],"x-enumNames":["NATIVE","IPA","PHONETIC"],"nullable":true}},"required":["word","ipa","phonetic"]},"default":[]},"pronunciationDictionaryIds":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]},"a2aConnectionIds":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]},"a2aMetadataMappings":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"enabled":{"type":"boolean"}},"required":["name","value"]}}},"nullable":true,"default":{}},"a2aContextVars":{"type":"object","additionalProperties":{"type":"object","properties":{"contextId":{"type":"object","properties":{"value":{"type":"string"},"enabled":{"type":"boolean"}},"required":["value"]}}},"nullable":true,"default":{}},"aiCousticsNoiseReductionEnabled":{"type":"boolean","default":true},"useContactCustomCallerId":{"type":"boolean","default":false},"isTimezoneBasedOnContact":{"type":"boolean","default":false},"sendSipHeaders":{"type":"boolean","default":true},"backgroundNoiseVolumePercent":{"type":"integer","minimum":0,"exclusiveMinimum":false,"maximum":100,"exclusiveMaximum":false,"nullable":true},"enableEmotions":{"type":"boolean","default":false},"emotionMergeSentences":{"type":"boolean","default":false},"emotionMergeMaxSentences":{"type":"integer","minimum":2,"exclusiveMinimum":false,"maximum":5,"exclusiveMaximum":false,"nullable":true,"default":2},"emotionBreakTimeMs":{"type":"integer","minimum":50,"exclusiveMinimum":false,"maximum":2000,"exclusiveMaximum":false,"nullable":true,"default":500},"nestedScriptMaxDepth":{"type":"integer","minimum":1,"exclusiveMinimum":false,"maximum":10,"exclusiveMaximum":false,"nullable":true,"default":1}},"required":["retryDailyAttemptsSchedule","beforeGreetingTimeout","detectAiScreening","aiScreeningResponseTimeout","screeningFallbackTTL","screeningTopics","maxDuration"],"default":{}},"chatParams":{"description":"Chat channel, sender numbers, cadence, and drop-off configuration.","type":"object","properties":{"channel":{"type":"string","enum":["TWILIO","WHATSAPP","TELNYX","LINE","EMAIL"],"x-enumNames":["TWILIO","WHATSAPP","TELNYX","LINE","EMAIL"],"nullable":true},"phonesFrom":{"type":"array","items":{"type":"string"},"default":[]},"phoneSelectionStrategy":{"type":"string","enum":["ROTATE_NUMBERS","PREFER_LOCAL_NUMBERS","AUTO_OPTIMIZE"],"x-enumNames":["ROTATE_NUMBERS","PREFER_LOCAL_NUMBERS","AUTO_OPTIMIZE"],"default":"ROTATE_NUMBERS"},"windowMinutes":{"type":"number","default":5},"additionalPrompt":{"type":"string","nullable":true},"restrictionsPrompt":{"type":"string","nullable":true},"useAdditionalRulesOnly":{"type":"boolean","nullable":true,"default":false},"followUpPrompt":{"type":"string","nullable":true},"followUpAttempts":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":1},"followUpDailyAttempts":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":50,"exclusiveMaximum":false,"default":1},"followUpIntervalMinutes":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":90},"followUpSchedule":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"value":{"type":"number"}},"required":["from","to","value"]},"default":[]},"minDelaySec":{"type":"number","default":3},"maxDelaySec":{"type":"number","default":10},"timezone":{"type":"string","nullable":true,"default":"UTC"},"availabilitySchedule":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"oneOf":[{"type":"string","enum":["Sunday"]},{"type":"string","enum":["Monday"]},{"type":"string","enum":["Tuesday"]},{"type":"string","enum":["Wednesday"]},{"type":"string","enum":["Thursday"]},{"type":"string","enum":["Friday"]},{"type":"string","enum":["Saturday"]}]},"timeSlots":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"string","default":"09:00"},"endTime":{"type":"string","default":"17:00"}}}}},"required":["dayOfWeek","timeSlots"]},"default":[{"dayOfWeek":"Monday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Tuesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Wednesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Thursday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Friday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]}]},"retryFollowUp":{"type":"boolean","default":false},"followUpDelayMinutes":{"type":"number","minimum":60,"exclusiveMinimum":false,"maximum":43200,"exclusiveMaximum":false,"default":1440},"dropOffFollowUp":{"type":"boolean","default":false},"dropOffAttempts":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":1},"dropOffDailyAttempts":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":50,"exclusiveMaximum":false,"default":1},"dropOffIntervalMinutes":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":1440},"dropOffSchedule":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"value":{"type":"number"}},"required":["from","to","value"]},"default":[]},"splitMessagesIntoSentences":{"type":"boolean","nullable":true,"default":false}},"required":["followUpDailyAttempts","followUpSchedule","followUpDelayMinutes","dropOffDailyAttempts","dropOffSchedule"],"nullable":true},"emailParams":{"description":"Email connections, sender behavior, follow-up cadence, content, and signature configuration.","type":"object","properties":{"outboundConnectionIds":{"type":"array","items":{"type":"string"},"default":[]},"inboundConnectionIds":{"type":"array","items":{"type":"string"},"default":[]},"emailSelectionStrategy":{"type":"string","enum":["ROTATE","RANDOM","FIXED"],"x-enumNames":["ROTATE","RANDOM","FIXED"],"default":"ROTATE"},"signature":{"type":"string","nullable":true},"signatureId":{"type":"string","nullable":true},"signatureName":{"type":"string","nullable":true},"defaultSubject":{"type":"string","nullable":true},"followUpSteps":{"type":"array","maxItems":10,"items":{"type":"object","properties":{"delayValue":{"type":"number","minimum":1,"exclusiveMinimum":false},"delayUnit":{"type":"string","enum":["min","hour","day"],"x-enumNames":["MINUTES","HOURS","DAYS"],"default":"min"},"contentMode":{"type":"string","enum":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"x-enumNames":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"default":"HUMAN_TEMPLATE"},"body":{"type":"string","nullable":true},"prompt":{"type":"string","nullable":true}},"required":["delayValue"]},"default":[]},"followUpRespectSchedule":{"type":"boolean","default":true},"followUpOnlyIfNoReply":{"type":"boolean","default":true},"fallbackEnabled":{"type":"boolean","default":false},"fallbackPrompt":{"type":"string","nullable":true},"additionalPrompt":{"type":"string","nullable":true},"restrictionsPrompt":{"type":"string","nullable":true},"useAdditionalRulesOnly":{"type":"boolean","nullable":true,"default":false},"timezone":{"type":"string","nullable":true,"default":"UTC"},"availabilitySchedule":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"oneOf":[{"type":"string","enum":["Sunday"]},{"type":"string","enum":["Monday"]},{"type":"string","enum":["Tuesday"]},{"type":"string","enum":["Wednesday"]},{"type":"string","enum":["Thursday"]},{"type":"string","enum":["Friday"]},{"type":"string","enum":["Saturday"]}]},"timeSlots":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"string","default":"09:00"},"endTime":{"type":"string","default":"17:00"}}}}},"required":["dayOfWeek","timeSlots"]},"default":[{"dayOfWeek":"Monday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Tuesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Wednesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Thursday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Friday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]}]},"retryFollowUp":{"type":"boolean","default":false},"approvalConditions":{"type":"array","items":{"type":"string"},"nullable":true}},"required":["approvalConditions"],"nullable":true},"maxOutgoingConcurrency":{"type":"number","default":10},"maxOutgoingCallsBatchSize":{"type":"number","default":2},"limitOutgoingConcurrency":{"type":"boolean","default":true},"summaryQuestions":{"description":"Post-interaction summary questions. Each question requires a non-empty name; description and options are optional.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"x-enumNames":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"nullable":true,"default":"OPEN_QUESTION"},"options":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["name","options"]},"default":[]},"toolFunctions":{"description":"Callable HTTP or integration actions available during an interaction. Every function definition and every parameter property must include a non-empty description. External tools require apiData; ActivePieces tools require activePieceData.","type":"array","items":{"type":"object","properties":{"catalogId":{"description":"Stable unique id for this tool function in the campaign workflow catalog.","type":"string"},"functionDefinition":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9_-]+$","maxLength":64},"description":{"type":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","default":"object"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"}},"required":["type","description"]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]*$"},"default":[]},"additionalProperties":{"type":"boolean","default":false}},"required":["properties"]},"strict":{"type":"boolean","default":true}},"required":["name","description","parameters"]},"apiData":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"x-enumNames":["GET","POST","PUT","DELETE","PATCH"],"default":"GET"},"url":{"type":"string","default":""},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"default":[]},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"default":[]},"body":{"type":"string"},"outputParamsSchema":{"type":"string"},"ignoreResponse":{"type":"boolean","default":false},"useRSASignature":{"type":"boolean"},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"name":{"type":"string"},"apiType":{"type":"string","enum":["EXTERNAL","ACTIVE_PIECE","SYNTHETIC_SYSTEM_API_CALL"],"x-enumNames":["EXTERNAL","ACTIVE_PIECE","SYNTHETIC_SYSTEM_API_CALL"],"default":"EXTERNAL"},"activePieceData":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectionId":{"type":"string","nullable":true},"requestData":{"default":{}},"pieceVersion":{"type":"string","nullable":true},"signRequest":{"oneOf":[{"type":"boolean"},{"type":"string"}],"nullable":true},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true},"actionId":{"type":"string","minLength":1}},"required":["id","actionId"]},"outputParamsSchema":{"type":"string"},"ignoreResponse":{"type":"boolean"}},"required":["functionDefinition","name"]},"default":[]},"triggers":{"description":"Trigger definitions used by trigger and event-driven campaigns.","type":"array","items":{"type":"object","properties":{"catalogId":{"description":"Stable unique id for this trigger in the campaign workflow catalog.","type":"string"},"activePieceTrigger":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectionId":{"type":"string","nullable":true},"requestData":{"default":{}},"pieceVersion":{"type":"string","nullable":true},"signRequest":{"oneOf":[{"type":"boolean"},{"type":"string"}],"nullable":true},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true},"triggerId":{"type":"string","minLength":1},"triggerStrategy":{"type":"string","enum":["POLLING","WEBHOOK","APP_WEBHOOK"],"x-enumNames":["POLLING","WEBHOOK","APP_WEBHOOK"],"default":"POLLING"}},"required":["id","triggerId"]},"contactMapper":{"default":{}},"type":{"type":"string","enum":["add_contact","archive_contact","inbound_email"],"x-enumNames":["ADD_CONTACT","ARCHIVE_CONTACT","INBOUND_EMAIL"],"nullable":true,"default":"add_contact"}},"required":["activePieceTrigger"]},"default":[]},"preCallActions":{"description":"Actions run before an outbound call. ActivePieces actions require their activePieceAction configuration.","type":"array","items":{"type":"object","properties":{"catalogId":{"description":"Stable unique id for this pre-call action in the campaign workflow catalog. Required for split-traffic versions so multiple instances of the same piece stay distinct.","type":"string"},"activePieceAction":{"description":"The integration action to execute before the call. Contains the piece ID, action ID, connection ID, request data (input payload with {{contact.phoneNumber}}, {{contact.data.fieldName}} interpolation for dynamic values), and piece version.","type":"object","properties":{"id":{"type":"string","minLength":1},"connectionId":{"type":"string","nullable":true},"requestData":{"default":{}},"pieceVersion":{"type":"string","nullable":true},"signRequest":{"oneOf":[{"type":"boolean"},{"type":"string"}],"nullable":true},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true},"actionId":{"type":"string","minLength":1}},"required":["id","actionId"]},"contactMapper":{"description":"Maps API response fields to contact variables. Keys are camelCase variable names (become {{ variableName }} in scripts), values are dot-notation paths into the API response (e.g., 'data.leadScore').","type":"object","additionalProperties":{"type":"string"},"default":{}},"timeout":{"description":"Timeout in milliseconds for the API call. Default: 5000.","type":"integer","minimum":0,"exclusiveMinimum":true,"default":5000},"executionScope":{"description":"EVERY_ATTEMPT (default): run before every call attempt. ONCE_PER_CONTACT: run only on first attempt, cache results for retries. When ONCE_PER_CONTACT, storeInfo is automatically true.","type":"string","enum":["EVERY_ATTEMPT","ONCE_PER_CONTACT"],"x-enumNames":["EVERY_ATTEMPT","ONCE_PER_CONTACT"],"default":"EVERY_ATTEMPT"},"storeInfo":{"description":"Whether to persist mapped response data on the contact record. Automatically true when executionScope is ONCE_PER_CONTACT. Default: true.","type":"boolean","default":true},"suppressCallOnHttpError":{"description":"Whether to prevent the call when the action returns a 4xx or 5xx HTTP status. Default: false.","type":"boolean","default":false}},"required":["activePieceAction"]},"default":[]},"allowContactDuplicates":{"type":"boolean","default":false},"backgroundNoiseId":{"type":"string","nullable":true,"default":null},"knowledgeBaseIds":{"description":"Knowledge bases available to the campaign. IDs must belong to the authenticated organization.","type":"array","items":{"type":"string"},"default":[]},"campaignGroupId":{"description":"Optional campaign group ID from the authenticated organization.","type":"string","nullable":true,"default":null,"pattern":"^[0-9a-fA-F]{24}$"},"dialingStrategy":{"type":"string","enum":["ROTATE_NUMBERS","PREFER_LOCAL_NUMBERS","AUTO_OPTIMIZE"],"x-enumNames":["ROTATE_NUMBERS","PREFER_LOCAL_NUMBERS","AUTO_OPTIMIZE"],"default":"ROTATE_NUMBERS"},"type":{"description":"Campaign channel: CALL, CHAT, EMAIL, or TRIGGER. Defaults to CALL.","type":"string","enum":["CALL","CHAT","TRIGGER","EMAIL"],"default":"CALL"},"preCallChat":{"type":"object","properties":{"content":{"type":"string"},"allowCallingOutsideWorkingHours":{"type":"boolean"},"responseTimeout":{"type":"number","minimum":1,"exclusiveMinimum":false,"default":300},"nudge":{"type":"boolean","default":false},"noResponseAction":{"type":"string","enum":["PROCEED_VOICE","DO_NOT_CALL"],"x-enumNames":["PROCEED_VOICE","DO_NOT_CALL"],"default":"PROCEED_VOICE"},"refusedCallAction":{"type":"string","enum":["CONTINUE_IN_CHAT","DO_NOT_CALL"],"x-enumNames":["CONTINUE_IN_CHAT","DO_NOT_CALL"],"default":"DO_NOT_CALL"}},"required":["content","allowCallingOutsideWorkingHours"],"nullable":true},"useCase":{"type":"string","nullable":true},"useLocalDnc":{"type":"boolean","nullable":true},"useLocalDialing":{"type":"boolean","nullable":true},"shouldAddToLocalDnc":{"type":"boolean","nullable":true},"sensitiveContentRestricted":{"type":"boolean","default":false},"deleteTranscriptsWithSensitiveData":{"type":"boolean","default":false},"deleteRecordingsWithSensitiveData":{"type":"boolean","default":false},"maskSensitiveMessages":{"type":"boolean","default":false},"turnOffContactMemories":{"type":"boolean","default":false},"turnOffContactMemoryContribution":{"type":"boolean","default":false},"turnOffGlobalContactMemories":{"type":"boolean","default":false},"useCustomContactMemoryPrompt":{"type":"boolean","default":false},"contactMemoryPrompt":{"type":"string","maxLength":2000,"nullable":true},"contactMemoryTextLimit":{"type":"integer","minimum":50,"exclusiveMinimum":false,"maximum":1000,"exclusiveMaximum":false,"nullable":true},"manualInputOnly":{"type":"boolean","default":false},"sendUserEmotionToA2a":{"type":"boolean","default":false},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"default":[]},"ignoredContactVariables":{"type":"array","items":{"type":"string"},"default":[]},"guardrailSettings":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"useOrganizationGuardrails":{"type":"boolean","default":true},"guardrails":{"type":"array","items":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"name":{"type":"string"},"prompt":{"type":"string","nullable":true}},"required":["name"]},"default":[]},"validateByChunk":{"type":"boolean","default":false},"onFailAction":{"oneOf":[{"type":"string","enum":["HANGUP","TRANSFER","REGENERATE"],"x-enumNames":["HANGUP","TRANSFER","REGENERATE"]},{"type":"string","enum":[""]}],"default":"HANGUP"},"transfer":{"type":"object","properties":{"message":{"type":"string","nullable":true},"phoneNumberType":{"type":"string","enum":["Phone Number","Contact Field","SIP URI","Human Agent Queue"],"x-enumNames":["PHONE_NUMBER","CONTACT_FIELD","SIP_URI","HUMAN_AGENT_QUEUE"],"nullable":true},"phoneNumber":{"type":"string","nullable":true},"contactAsCallerId":{"type":"boolean","nullable":true},"humanAgentQueueId":{"type":"string","nullable":true},"warmTransfer":{"type":"boolean","nullable":true},"warmTransferAgentOnly":{"type":"boolean","nullable":true},"warmTransferPlayOnDTMF":{"type":"boolean","nullable":true},"warmTransferPrompt":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"voiceId":{"description":"Convenience alias for callParams.voice. When supplied, this value takes precedence.","type":"string","pattern":"^[0-9a-fA-F]{24}$"},"phoneNumbers":{"description":"Convenience alias for callParams.phonesFrom. When supplied, this list takes precedence; an empty list clears assigned call numbers.","type":"array","items":{"type":"string"}},"webCallCredentials":{"type":"object","properties":{"allowedOrigins":{"type":"array","items":{"type":"string"},"default":[]},"captchaEnabled":{"type":"boolean","nullable":true},"captchaProvider":{"type":"string","nullable":true},"captchaSiteKey":{"type":"string","nullable":true},"captchaSecret":{"type":"string","nullable":true}},"nullable":true},"agentGroupId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true}},"required":["name","useLocalDialing","contactMemoryPrompt"]},"AgentReplaceExternalDto":{"type":"object","properties":{"name":{"description":"Human-readable campaign name. Minimum 3 characters.","type":"string","minLength":3},"steps":{"description":"Legacy flat script steps. Use this or nestedSteps; omitted scripts receive the standard starter step.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string","enum":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"],"x-enumNames":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"]},"template":{"type":"string","default":""},"title":{"type":"string","nullable":true},"meeting":{"type":"object","properties":{"eventTypeId":{"type":"string","nullable":true},"daysAhead":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":60,"exclusiveMaximum":false,"nullable":true},"noSlotsStrategy":{"type":"string","nullable":true},"noSlotsFallbackText":{"type":"string","nullable":true}},"required":["daysAhead"],"nullable":true},"description":{"type":"string","nullable":true},"data":{"type":"object","properties":{"template":{"type":"string","minLength":1,"nullable":true},"incomingTemplate":{"type":"string","minLength":1,"nullable":true,"default":"Hi {{ name }}! How are you doing today?"},"phoneNumberType":{"type":"string","enum":["Phone Number","Contact Field","SIP URI","Human Agent Queue"],"x-enumNames":["PHONE_NUMBER","CONTACT_FIELD","SIP_URI","HUMAN_AGENT_QUEUE"],"default":"Phone Number","nullable":true},"phoneNumber":{"type":"string","nullable":true},"humanAgentQueueId":{"type":"string","minLength":1,"nullable":true},"contactAsCallerId":{"type":"boolean","default":false,"nullable":true},"warmTransfer":{"type":"boolean","default":false,"nullable":true},"warmTransferPrompt":{"type":"string","nullable":true},"warmTransferAgentOnly":{"type":"boolean","default":true,"nullable":true},"warmTransferPlayOnDTMF":{"type":"boolean","default":false,"nullable":true},"ringTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":600,"exclusiveMaximum":false,"nullable":true},"whatsappTemplateStatus":{"type":"string","nullable":true},"whatsappTemplateName":{"type":"string","nullable":true},"sendingStrategy":{"type":"string","enum":["NODE_REACHED","AFTER_CALL"],"x-enumNames":["NODE_REACHED","AFTER_CALL"],"nullable":true,"default":"NODE_REACHED"},"functionName":{"type":"string","minLength":1,"nullable":true},"systemScenario":{"type":"string","enum":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"x-enumNames":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"nullable":true},"isBackgroundActionRun":{"type":"boolean","default":false,"nullable":true},"skipAssistantMessage":{"type":"boolean","default":false,"nullable":true},"type":{"type":"string","enum":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"x-enumNames":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"nullable":true},"formElements":{"nullable":true},"formName":{"type":"string","nullable":true},"a2uiPrompt":{"type":"string","nullable":true},"presentationMode":{"type":"string","enum":["popover","inline-card","message-bubble"],"nullable":true},"viewOnly":{"type":"boolean","nullable":true},"functionNames":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"a2aConnectionIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"waitConditionMatchMode":{"type":"string","enum":["ALL","ANY"],"x-enumNames":["ALL","ANY"],"nullable":true},"waitTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":180,"exclusiveMaximum":false,"nullable":true}},"required":["functionNames","a2aConnectionIds"],"nullable":true},"summary":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"x-enumNames":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"nullable":true,"default":"OPEN_QUESTION"},"options":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["name","options"]}},"callParams":{"type":"object","properties":{"minSilenceMsBeforeResponse":{"type":"integer","minimum":0,"exclusiveMinimum":false,"nullable":true},"detectInterruption":{"type":"boolean","default":true},"noInterruptionOnce":{"type":"boolean","default":false},"enableKeypadInput":{"type":"boolean","default":false}},"required":["minSilenceMsBeforeResponse"],"nullable":true},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true},"emailData":{"type":"object","properties":{"subject":{"type":"string","nullable":true},"body":{"type":"string","default":""},"attachments":{"nullable":true},"prompt":{"type":"string","nullable":true},"tone":{"type":"string","enum":["default","direct","formal","casual","creative","based_on_contact"],"x-enumNames":["DEFAULT","DIRECT","FORMAL","CASUAL","CREATIVE","BASED_ON_CONTACT"],"nullable":true},"contentMode":{"type":"string","enum":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"x-enumNames":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"nullable":true},"includeSignature":{"type":"boolean","nullable":true},"signatureId":{"type":"string","nullable":true},"isSubjectOverridden":{"type":"boolean","nullable":true}},"required":["prompt","tone","contentMode","includeSignature","signatureId","isSubjectOverridden"],"nullable":true}},"required":["type","meeting","description","summary","callParams","scriptUpdateRules","emailData"]},"default":[{"id":"bqUjnsC","type":"OTHER","template":"Hello, is this {{ name }} ?","meeting":null,"description":null,"data":null,"summary":[]}]},"nestedSteps":{"description":"Hierarchical script nodes containing prompts, actions, transfers, forms, and meetings.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"nestedScriptLabel":{"description":"Cosmetic, user-authored label shown above a nested-script block in the editor UI only. Not used in the generated prompt. If a node already has this value, preserve it exactly — never invent, translate, rewrite, or drop it. Omit this property entirely when it is not set.","type":"string","nullable":true},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string","enum":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"],"x-enumNames":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"]},"template":{"type":"string","default":""},"title":{"type":"string","nullable":true},"meeting":{"type":"object","properties":{"eventTypeId":{"type":"string","nullable":true},"daysAhead":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":60,"exclusiveMaximum":false,"nullable":true},"noSlotsStrategy":{"type":"string","nullable":true},"noSlotsFallbackText":{"type":"string","nullable":true}},"required":["daysAhead"],"nullable":true},"description":{"type":"string","nullable":true},"data":{"type":"object","properties":{"template":{"type":"string","minLength":1,"nullable":true},"incomingTemplate":{"type":"string","minLength":1,"nullable":true,"default":"Hi {{ name }}! How are you doing today?"},"phoneNumberType":{"type":"string","enum":["Phone Number","Contact Field","SIP URI","Human Agent Queue"],"x-enumNames":["PHONE_NUMBER","CONTACT_FIELD","SIP_URI","HUMAN_AGENT_QUEUE"],"default":"Phone Number","nullable":true},"phoneNumber":{"type":"string","nullable":true},"humanAgentQueueId":{"type":"string","minLength":1,"nullable":true},"contactAsCallerId":{"type":"boolean","default":false,"nullable":true},"warmTransfer":{"type":"boolean","default":false,"nullable":true},"warmTransferPrompt":{"type":"string","nullable":true},"warmTransferAgentOnly":{"type":"boolean","default":true,"nullable":true},"warmTransferPlayOnDTMF":{"type":"boolean","default":false,"nullable":true},"ringTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":600,"exclusiveMaximum":false,"nullable":true},"whatsappTemplateStatus":{"type":"string","nullable":true},"whatsappTemplateName":{"type":"string","nullable":true},"sendingStrategy":{"type":"string","enum":["NODE_REACHED","AFTER_CALL"],"x-enumNames":["NODE_REACHED","AFTER_CALL"],"nullable":true,"default":"NODE_REACHED"},"functionName":{"type":"string","minLength":1,"nullable":true},"systemScenario":{"type":"string","enum":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"x-enumNames":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"nullable":true},"isBackgroundActionRun":{"type":"boolean","default":false,"nullable":true},"skipAssistantMessage":{"type":"boolean","default":false,"nullable":true},"type":{"type":"string","enum":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"x-enumNames":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"nullable":true},"formElements":{"nullable":true},"formName":{"type":"string","nullable":true},"a2uiPrompt":{"type":"string","nullable":true},"presentationMode":{"type":"string","enum":["popover","inline-card","message-bubble"],"nullable":true},"viewOnly":{"type":"boolean","nullable":true},"functionNames":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"a2aConnectionIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"waitConditionMatchMode":{"type":"string","enum":["ALL","ANY"],"x-enumNames":["ALL","ANY"],"nullable":true},"waitTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":180,"exclusiveMaximum":false,"nullable":true}},"required":["functionNames","a2aConnectionIds"],"nullable":true},"summary":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"x-enumNames":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"nullable":true,"default":"OPEN_QUESTION"},"options":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["name","options"]}},"callParams":{"type":"object","properties":{"minSilenceMsBeforeResponse":{"type":"integer","minimum":0,"exclusiveMinimum":false,"nullable":true},"detectInterruption":{"type":"boolean","default":true},"noInterruptionOnce":{"type":"boolean","default":false},"enableKeypadInput":{"type":"boolean","default":false}},"required":["minSilenceMsBeforeResponse"],"nullable":true},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true},"emailData":{"type":"object","properties":{"subject":{"type":"string","nullable":true},"body":{"type":"string","default":""},"attachments":{"nullable":true},"prompt":{"type":"string","nullable":true},"tone":{"type":"string","enum":["default","direct","formal","casual","creative","based_on_contact"],"x-enumNames":["DEFAULT","DIRECT","FORMAL","CASUAL","CREATIVE","BASED_ON_CONTACT"],"nullable":true},"contentMode":{"type":"string","enum":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"x-enumNames":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"nullable":true},"includeSignature":{"type":"boolean","nullable":true},"signatureId":{"type":"string","nullable":true},"isSubjectOverridden":{"type":"boolean","nullable":true}},"required":["prompt","tone","contentMode","includeSignature","signatureId","isSubjectOverridden"],"nullable":true}},"required":["type","meeting","description","summary","callParams","scriptUpdateRules","emailData"]}},"incomingEntryPoint":{"description":"Marks the first subflow of an inbound-only email campaign as a graph entry point. Such nodes have no script steps — the incoming message is provided at runtime. Omit this property entirely when it is not true — do not set it to false.","type":"boolean","nullable":true},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true},"nestedScriptHead":{"description":"Marks this node as a nested script (collapsible sub-tree in the UI). If true in the current campaign, you MUST include it as true. Omit this property entirely when it is not true — do not set it to false.","type":"boolean","nullable":true}},"required":["id","title","steps","scriptUpdateRules"]},"default":[]},"edges":{"description":"Directed graph edges connecting script and nested-script nodes.","type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"source":{"type":"string","minLength":1},"target":{"type":"string","minLength":1},"goTo":{"type":"boolean","nullable":true,"default":false},"additionalInstructions":{"type":"string","default":"","nullable":true},"branch":{"type":"string","enum":["SUCCESS","FALLBACK"],"x-enumNames":["SUCCESS","FALLBACK"],"nullable":true}},"required":["id","source","target","additionalInstructions"]},"default":[]},"fallbacks":{"description":"Fallback behavior for silence, errors, retries, and unhandled input.","type":"array","items":{"type":"object","properties":{"input":{"type":"string","minLength":1},"output":{"oneOf":[{"type":"string","minLength":1},{"type":"array","minItems":1,"items":{"type":"object","properties":{"id":{"type":"string","nullable":true},"type":{"type":"string","enum":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"],"x-enumNames":["OTHER","FORWARD","QUESTION","SMS","EMAIL","MEETING","NEXT_STEP","SYSTEM","FUNCTION_CALL","WHATSAPP_TEMPLATE","WIDGET","WAIT_FOR_EVENTS"]},"template":{"type":"string","default":""},"title":{"type":"string","nullable":true},"meeting":{"type":"object","properties":{"eventTypeId":{"type":"string","nullable":true},"daysAhead":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":60,"exclusiveMaximum":false,"nullable":true},"noSlotsStrategy":{"type":"string","nullable":true},"noSlotsFallbackText":{"type":"string","nullable":true}},"required":["daysAhead"],"nullable":true},"description":{"type":"string","nullable":true},"data":{"type":"object","properties":{"template":{"type":"string","minLength":1,"nullable":true},"incomingTemplate":{"type":"string","minLength":1,"nullable":true,"default":"Hi {{ name }}! How are you doing today?"},"phoneNumberType":{"type":"string","enum":["Phone Number","Contact Field","SIP URI","Human Agent Queue"],"x-enumNames":["PHONE_NUMBER","CONTACT_FIELD","SIP_URI","HUMAN_AGENT_QUEUE"],"default":"Phone Number","nullable":true},"phoneNumber":{"type":"string","nullable":true},"humanAgentQueueId":{"type":"string","minLength":1,"nullable":true},"contactAsCallerId":{"type":"boolean","default":false,"nullable":true},"warmTransfer":{"type":"boolean","default":false,"nullable":true},"warmTransferPrompt":{"type":"string","nullable":true},"warmTransferAgentOnly":{"type":"boolean","default":true,"nullable":true},"warmTransferPlayOnDTMF":{"type":"boolean","default":false,"nullable":true},"ringTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":600,"exclusiveMaximum":false,"nullable":true},"whatsappTemplateStatus":{"type":"string","nullable":true},"whatsappTemplateName":{"type":"string","nullable":true},"sendingStrategy":{"type":"string","enum":["NODE_REACHED","AFTER_CALL"],"x-enumNames":["NODE_REACHED","AFTER_CALL"],"nullable":true,"default":"NODE_REACHED"},"functionName":{"type":"string","minLength":1,"nullable":true},"systemScenario":{"type":"string","enum":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"x-enumNames":["GOODBYE","HOLD_ON","USER_WANTS_HANGUP","WRONG_NUMBER","VOICEMAIL_FALLBACK","SCREENING_FALLBACK","SCREENING_DTMF_FALLBACK","SCREENING_FALLBACK_HOLD_ON","SCREENING_HANG_UP"],"nullable":true},"isBackgroundActionRun":{"type":"boolean","default":false,"nullable":true},"skipAssistantMessage":{"type":"boolean","default":false,"nullable":true},"type":{"type":"string","enum":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"x-enumNames":["FORM","STEPPED","JSON","A2UI","A2UI_GENERATION"],"nullable":true},"formElements":{"nullable":true},"formName":{"type":"string","nullable":true},"a2uiPrompt":{"type":"string","nullable":true},"presentationMode":{"type":"string","enum":["popover","inline-card","message-bubble"],"nullable":true},"viewOnly":{"type":"boolean","nullable":true},"functionNames":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"a2aConnectionIds":{"type":"array","items":{"type":"string","minLength":1},"nullable":true},"waitConditionMatchMode":{"type":"string","enum":["ALL","ANY"],"x-enumNames":["ALL","ANY"],"nullable":true},"waitTimeoutSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"maximum":180,"exclusiveMaximum":false,"nullable":true}},"required":["functionNames","a2aConnectionIds"],"nullable":true},"summary":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"x-enumNames":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"nullable":true,"default":"OPEN_QUESTION"},"options":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["name","options"]}},"callParams":{"type":"object","properties":{"minSilenceMsBeforeResponse":{"type":"integer","minimum":0,"exclusiveMinimum":false,"nullable":true},"detectInterruption":{"type":"boolean","default":true},"noInterruptionOnce":{"type":"boolean","default":false},"enableKeypadInput":{"type":"boolean","default":false}},"required":["minSilenceMsBeforeResponse"],"nullable":true},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true},"emailData":{"type":"object","properties":{"subject":{"type":"string","nullable":true},"body":{"type":"string","default":""},"attachments":{"nullable":true},"prompt":{"type":"string","nullable":true},"tone":{"type":"string","enum":["default","direct","formal","casual","creative","based_on_contact"],"x-enumNames":["DEFAULT","DIRECT","FORMAL","CASUAL","CREATIVE","BASED_ON_CONTACT"],"nullable":true},"contentMode":{"type":"string","enum":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"x-enumNames":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"nullable":true},"includeSignature":{"type":"boolean","nullable":true},"signatureId":{"type":"string","nullable":true},"isSubjectOverridden":{"type":"boolean","nullable":true}},"required":["prompt","tone","contentMode","includeSignature","signatureId","isSubjectOverridden"],"nullable":true}},"required":["type","meeting","description","summary","callParams","scriptUpdateRules","emailData"]}}]},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"nullable":true}},"required":["input","output","scriptUpdateRules"]},"default":[]},"interestCriteria":{"type":"string","nullable":true,"default":null},"interestCriteriaV2":{"description":"Interest classification criteria. Include a non-empty value when defining a custom criterion.","type":"object","properties":{"value":{"type":"string","nullable":true},"successCriteria":{"type":"object","properties":{"interested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["INTERESTED","NOT_INTERESTED"],"x-enumNames":["INTERESTED","NOT_INTERESTED"]},"order":{"type":"number"},"default":{"type":"boolean","nullable":true},"immutable":{"type":"boolean","nullable":true}},"required":["name","description","type","order","default","immutable"]},"default":[]},"notInterested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["INTERESTED","NOT_INTERESTED"],"x-enumNames":["INTERESTED","NOT_INTERESTED"]},"order":{"type":"number"},"default":{"type":"boolean","nullable":true},"immutable":{"type":"boolean","nullable":true}},"required":["name","description","type","order","default","immutable"]},"default":[]}},"nullable":true},"updatedAt":{"oneOf":[{"type":"string"},{}],"nullable":true},"isReviewed":{"type":"boolean"}},"nullable":true},"webhookUrl":{"type":"string","nullable":true},"slackUrl":{"type":"string","nullable":true},"webhookStatuses":{"type":"array","items":{"type":"string"},"default":["INTERESTED","NOT_INTERESTED","CALL_ME_LATER","WRONG_NUMBER","DO_NOT_CALL","COMPLETED"]},"webhookEvents":{"type":"array","items":{"type":"string"},"default":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL"]},"webhooks":{"type":"array","items":{"type":"object","properties":{"catalogId":{"description":"Stable unique id for this webhook in the campaign workflow catalog.","type":"string","nullable":true},"name":{"type":"string","maxLength":30,"nullable":true},"url":{"type":"string","nullable":true},"events":{"type":"array","items":{"type":"string"},"default":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL"]},"isAdvanced":{"type":"boolean","nullable":true,"default":false},"advancedWebhook":{"type":"object","properties":{"url":{"type":"string","format":"uri","nullable":true},"method":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"x-enumNames":["GET","POST","PUT","DELETE","PATCH"],"nullable":true},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"enabled":{"type":"boolean"}},"required":["name","value"]},"nullable":true},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"enabled":{"type":"boolean"}},"required":["name","value"]},"nullable":true},"body":{"type":"string","nullable":true},"payload":{"type":"object","additionalProperties":{}},"isBranded":{"type":"boolean"},"apiData":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"x-enumNames":["GET","POST","PUT","DELETE","PATCH"],"default":"GET"},"url":{"type":"string","default":""},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"default":[]},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"default":[]},"body":{"type":"string"},"outputParamsSchema":{"type":"string"},"ignoreResponse":{"type":"boolean","default":false},"useRSASignature":{"type":"boolean"},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true}},"nullable":true},"apiType":{"type":"string","enum":["EXTERNAL","ACTIVE_PIECE","SYNTHETIC_SYSTEM_API_CALL"],"x-enumNames":["EXTERNAL","ACTIVE_PIECE","SYNTHETIC_SYSTEM_API_CALL"],"default":"EXTERNAL"},"activePieceData":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectionId":{"type":"string","nullable":true},"requestData":{"default":{}},"pieceVersion":{"type":"string","nullable":true},"signRequest":{"oneOf":[{"type":"boolean"},{"type":"string"}],"nullable":true},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true},"actionId":{"type":"string","minLength":1}},"required":["id","actionId"],"nullable":true},"outputParamsSchema":{"type":"string"},"ignoreResponse":{"type":"boolean"},"testResponse":{"nullable":true},"contactMapper":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"functionDefinition":{"type":"object","properties":{"parameters":{"type":"object","properties":{"type":{"type":"string","default":"object"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"}},"required":["type","description"]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]*$"},"default":[]},"additionalProperties":{"type":"boolean","default":false}},"required":["properties"]}},"required":["parameters"],"nullable":true}},"nullable":true}}},"default":[]},"slackStatuses":{"type":"array","items":{"type":"string"},"default":["INTERESTED","NOT_INTERESTED","CALL_ME_LATER","WRONG_NUMBER","DO_NOT_CALL","COMPLETED"]},"slackEvents":{"type":"array","items":{"type":"string"},"default":[]},"isIncoming":{"description":"Whether interactions are initiated by the customer. Defaults to false.","type":"boolean","nullable":true,"default":false},"scriptVariables":{"type":"array","items":{"type":"string"},"default":[]},"scriptVariablesV2":{"description":"Typed script variables. Omit to receive direction-aware defaults.","type":"array","items":{"type":"object","properties":{"variableName":{"type":"string","minLength":1},"required":{"type":"boolean"},"source":{"type":"string","nullable":true}},"required":["variableName","required"]}},"maxIncomingSlots":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":20,"exclusiveMaximum":false,"default":2},"callParams":{"description":"Call, speech, scheduling, retry, recording, voicemail, web-call, and model settings. Nested fields use the same defaults as the UI.","type":"object","properties":{"timezone":{"type":"string","nullable":true,"default":"UTC"},"allowIncomingCalls":{"type":"boolean","default":false},"acceptWebCalls":{"type":"boolean","default":false},"webCallWorkingHoursOnly":{"type":"boolean","default":false},"webCallTheme":{"type":"object","properties":{"base":{"type":"string","enum":["light","dark"]}},"required":["base"],"nullable":true},"webCallThemeId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true},"closeWidgetFormOnNextTranscriptMessage":{"type":"boolean","default":false},"detectInterruption":{"type":"boolean","default":true},"enableKeypadInput":{"type":"boolean","default":false},"flushDtmfOnHash":{"type":"boolean","default":true},"smartInterruptionDelayEnabled":{"type":"boolean","default":true},"afterInterruptionDelay":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":0.5},"detectSilence":{"type":"boolean","default":true},"detectHangup":{"type":"boolean","default":true},"retryDailyAttempts":{"type":"number","nullable":true,"default":3},"retryDailyAttemptsSchedule":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"value":{"type":"number"}},"required":["from","to","value"]},"default":[]},"detectShortSilenceSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":8},"detectHangupSilenceSeconds":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":30},"detectHangupUserRequestCount":{"type":"integer","minimum":0.01,"exclusiveMinimum":false,"default":20},"goodbyeUserRequestCount":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":4},"minSilenceMsBeforeResponse":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":1000},"voiceActivationDetection":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":10},"recognizedEventHandlingDelay":{"type":"integer","minimum":0,"exclusiveMinimum":false,"default":0},"retryAttempts":{"type":"number","default":5},"recognizedEventConfidenceThreshold":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.6},"recognizingEventConfidenceThreshold":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.5},"lowConfidenceDurationThreshold":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":250},"retryIntervalMinutes":{"type":"number","default":90},"temperature":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.25},"voice":{"type":"string","nullable":true},"phonesFrom":{"type":"array","items":{"type":"string"},"default":[]},"endTime":{"type":"string","nullable":true,"default":"17:00"},"startTime":{"type":"string","nullable":true,"default":"09:00"},"daysOfWeek":{"type":"array","items":{"oneOf":[{"type":"string","enum":["Sunday"]},{"type":"string","enum":["Monday"]},{"type":"string","enum":["Tuesday"]},{"type":"string","enum":["Wednesday"]},{"type":"string","enum":["Thursday"]},{"type":"string","enum":["Friday"]},{"type":"string","enum":["Saturday"]}]},"default":["Monday","Tuesday","Wednesday","Thursday","Friday"]},"availabilitySchedule":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"oneOf":[{"type":"string","enum":["Sunday"]},{"type":"string","enum":["Monday"]},{"type":"string","enum":["Tuesday"]},{"type":"string","enum":["Wednesday"]},{"type":"string","enum":["Thursday"]},{"type":"string","enum":["Friday"]},{"type":"string","enum":["Saturday"]}]},"timeSlots":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"string","default":"09:00"},"endTime":{"type":"string","default":"17:00"}}}}},"required":["dayOfWeek","timeSlots"]},"default":[{"dayOfWeek":"Monday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Tuesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Wednesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Thursday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Friday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]}]},"recordIncomingCall":{"type":"boolean","default":true},"recordOutgoingCall":{"type":"boolean","default":true},"stopRecordingOnTransfer":{"type":"boolean","default":false},"models":{"type":"object","properties":{"outgoingConversationModelIds":{"type":"array","items":{"type":"string"},"default":[]},"stageModelIds":{"type":"array","items":{"type":"string"},"default":[]},"voicemailModelIds":{"type":"array","items":{"type":"string"},"default":[]},"postProcessingVoicemailModelIds":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]},"prePostProcessingModelIds":{"type":"array","items":{"type":"string"},"default":[]},"pronunciationModelIds":{"type":"array","items":{"type":"string"},"default":[]},"incomingConversationModelIds":{"type":"array","items":{"type":"string"},"default":[]},"embeddingsModelIds":{"type":"array","items":{"type":"string"},"default":[]},"kbContentSplittingModelIds":{"type":"array","items":{"type":"string"},"default":[]},"warmTransferModelIds":{"type":"array","items":{"type":"string"},"default":[]},"phoneNumberPredictionsModelIds":{"type":"array","items":{"type":"string"},"default":[]}},"default":{"outgoingConversationModelIds":[],"stageModelIds":[],"voicemailModelIds":[],"postProcessingVoicemailModelIds":[],"prePostProcessingModelIds":[],"pronunciationModelIds":[],"incomingConversationModelIds":[],"embeddingsModelIds":[],"kbContentSplittingModelIds":[],"warmTransferModelIds":[],"phoneNumberPredictionsModelIds":[]}},"modelContainersSettings":{"type":"object","properties":{"outgoingConversationModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"incomingConversationModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"stageModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"voicemailModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"postProcessingVoicemailModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"prePostProcessingModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"pronunciationModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"embeddingsModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"kbContentSplittingModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"generateScriptModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"scriptProcessingModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true},"warmTransferModel":{"type":"object","properties":{"loops":{"type":"number","nullable":true}},"nullable":true}},"nullable":true},"notifyRecording":{"type":"boolean","default":false},"notifyRecordingFile":{"type":"string","nullable":true},"preloadGreetingEnabled":{"type":"boolean","default":true},"preloadGreetingUninterruptible":{"type":"boolean","default":false},"ignoreUserSpeechBeforeGreeting":{"type":"boolean","default":false},"beforeGreetingTimeout":{"type":"number","minimum":1,"exclusiveMinimum":false,"nullable":true},"checkDoNotCall":{"type":"boolean","default":false},"checkStateDoNotCall":{"type":"boolean","default":false},"twilioVoiceMailDetection":{"type":"boolean","default":true},"voxiaVoiceMailDetection":{"type":"boolean","default":true},"voiceMailFallbackEnabled":{"type":"boolean","default":false},"delayBeforeVoiceMailCheckSeconds":{"type":"integer","minimum":5,"exclusiveMinimum":false,"default":10},"detectAiScreening":{"type":"boolean","nullable":true,"default":false},"aiScreeningResponseTimeout":{"type":"integer","minimum":1,"exclusiveMinimum":false,"nullable":true,"default":30},"screeningFallbackTTL":{"type":"integer","minimum":1,"exclusiveMinimum":false,"nullable":true,"default":30},"screeningTopics":{"type":"string","nullable":true,"default":""},"retryCallMeLater":{"type":"boolean","default":true},"language":{"type":"string","default":"en"},"locale":{"type":"string","default":"en-US"},"smsConsentRequirement":{"type":"boolean","default":false},"openaiRealtime":{"type":"boolean","default":false},"geminiRealtime":{"type":"boolean","default":false},"sttCodeSwitching":{"type":"boolean","nullable":true},"sttKeywords":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]},"sttVocabulary":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"soundsLike":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["content"]},"nullable":true,"default":[]},"ragEnabled":{"type":"boolean","default":false},"nodeReachedHandlingDelayed":{"type":"boolean","default":true},"flushUserInputBufferAfterUninterruptible":{"type":"boolean","default":true},"collapseInactiveNestedSteps":{"type":"boolean","default":false},"additionalPrompt":{"type":"string","nullable":true},"restrictionsPrompt":{"type":"string","nullable":true},"useAdditionalRulesOnly":{"type":"boolean","nullable":true,"default":false},"useForcedToolCallsOnly":{"type":"boolean","default":true},"useConversationMeetingFunction":{"type":"boolean","default":false},"voiceMailEnabled":{"type":"boolean","default":false},"voiceMailMessage":{"type":"string","nullable":true},"voiceMailWhenToLeave":{"oneOf":[{"type":"string","enum":["EVERY_TIME"]},{"type":"string","enum":["ONCE_PER_CONTACT"]},{"type":"string","enum":["LAST_ATTEMPT"]}],"default":"EVERY_TIME"},"voiceMailRephraseWithAI":{"type":"boolean","default":false},"voiceMailBeepTimeout":{"type":"integer","default":5000},"noiseReduction":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":30,"exclusiveMaximum":false,"nullable":true},"maxDuration":{"type":"integer","minimum":1,"exclusiveMinimum":false,"maximum":60,"exclusiveMaximum":false,"nullable":true,"default":30},"channel":{"type":"string","enum":["TWILIO","WHATSAPP","TELNYX","LINE","EMAIL"],"x-enumNames":["TWILIO","WHATSAPP","TELNYX","LINE","EMAIL"],"nullable":true,"default":"TWILIO"},"pronunciationDictionary":{"type":"array","items":{"type":"object","properties":{"word":{"type":"string","minLength":1},"ipa":{"type":"string","minLength":1},"phonetic":{"type":"string","minLength":1},"native":{"type":"string","nullable":true},"selectedPlaybackType":{"type":"string","enum":["NATIVE","IPA","PHONETIC"],"x-enumNames":["NATIVE","IPA","PHONETIC"],"nullable":true}},"required":["word","ipa","phonetic"]},"default":[]},"pronunciationDictionaryIds":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]},"a2aConnectionIds":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]},"a2aMetadataMappings":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{}},{"type":"array","items":{}}]},"enabled":{"type":"boolean"}},"required":["name","value"]}}},"nullable":true,"default":{}},"a2aContextVars":{"type":"object","additionalProperties":{"type":"object","properties":{"contextId":{"type":"object","properties":{"value":{"type":"string"},"enabled":{"type":"boolean"}},"required":["value"]}}},"nullable":true,"default":{}},"aiCousticsNoiseReductionEnabled":{"type":"boolean","default":true},"useContactCustomCallerId":{"type":"boolean","default":false},"isTimezoneBasedOnContact":{"type":"boolean","default":false},"sendSipHeaders":{"type":"boolean","default":true},"backgroundNoiseVolumePercent":{"type":"integer","minimum":0,"exclusiveMinimum":false,"maximum":100,"exclusiveMaximum":false,"nullable":true},"enableEmotions":{"type":"boolean","default":false},"emotionMergeSentences":{"type":"boolean","default":false},"emotionMergeMaxSentences":{"type":"integer","minimum":2,"exclusiveMinimum":false,"maximum":5,"exclusiveMaximum":false,"nullable":true,"default":2},"emotionBreakTimeMs":{"type":"integer","minimum":50,"exclusiveMinimum":false,"maximum":2000,"exclusiveMaximum":false,"nullable":true,"default":500},"nestedScriptMaxDepth":{"type":"integer","minimum":1,"exclusiveMinimum":false,"maximum":10,"exclusiveMaximum":false,"nullable":true,"default":1}},"required":["retryDailyAttemptsSchedule","beforeGreetingTimeout","detectAiScreening","aiScreeningResponseTimeout","screeningFallbackTTL","screeningTopics","maxDuration"],"default":{}},"chatParams":{"description":"Chat channel, sender numbers, cadence, and drop-off configuration.","type":"object","properties":{"channel":{"type":"string","enum":["TWILIO","WHATSAPP","TELNYX","LINE","EMAIL"],"x-enumNames":["TWILIO","WHATSAPP","TELNYX","LINE","EMAIL"],"nullable":true},"phonesFrom":{"type":"array","items":{"type":"string"},"default":[]},"phoneSelectionStrategy":{"type":"string","enum":["ROTATE_NUMBERS","PREFER_LOCAL_NUMBERS","AUTO_OPTIMIZE"],"x-enumNames":["ROTATE_NUMBERS","PREFER_LOCAL_NUMBERS","AUTO_OPTIMIZE"],"default":"ROTATE_NUMBERS"},"windowMinutes":{"type":"number","default":5},"additionalPrompt":{"type":"string","nullable":true},"restrictionsPrompt":{"type":"string","nullable":true},"useAdditionalRulesOnly":{"type":"boolean","nullable":true,"default":false},"followUpPrompt":{"type":"string","nullable":true},"followUpAttempts":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":1},"followUpDailyAttempts":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":50,"exclusiveMaximum":false,"default":1},"followUpIntervalMinutes":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":90},"followUpSchedule":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"value":{"type":"number"}},"required":["from","to","value"]},"default":[]},"minDelaySec":{"type":"number","default":3},"maxDelaySec":{"type":"number","default":10},"timezone":{"type":"string","nullable":true,"default":"UTC"},"availabilitySchedule":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"oneOf":[{"type":"string","enum":["Sunday"]},{"type":"string","enum":["Monday"]},{"type":"string","enum":["Tuesday"]},{"type":"string","enum":["Wednesday"]},{"type":"string","enum":["Thursday"]},{"type":"string","enum":["Friday"]},{"type":"string","enum":["Saturday"]}]},"timeSlots":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"string","default":"09:00"},"endTime":{"type":"string","default":"17:00"}}}}},"required":["dayOfWeek","timeSlots"]},"default":[{"dayOfWeek":"Monday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Tuesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Wednesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Thursday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Friday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]}]},"retryFollowUp":{"type":"boolean","default":false},"followUpDelayMinutes":{"type":"number","minimum":60,"exclusiveMinimum":false,"maximum":43200,"exclusiveMaximum":false,"default":1440},"dropOffFollowUp":{"type":"boolean","default":false},"dropOffAttempts":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":1},"dropOffDailyAttempts":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":50,"exclusiveMaximum":false,"default":1},"dropOffIntervalMinutes":{"type":"number","minimum":0,"exclusiveMinimum":false,"default":1440},"dropOffSchedule":{"type":"array","items":{"type":"object","properties":{"from":{"type":"number"},"to":{"type":"number"},"value":{"type":"number"}},"required":["from","to","value"]},"default":[]},"splitMessagesIntoSentences":{"type":"boolean","nullable":true,"default":false}},"required":["followUpDailyAttempts","followUpSchedule","followUpDelayMinutes","dropOffDailyAttempts","dropOffSchedule"],"nullable":true},"emailParams":{"description":"Email connections, sender behavior, follow-up cadence, content, and signature configuration.","type":"object","properties":{"outboundConnectionIds":{"type":"array","items":{"type":"string"},"default":[]},"inboundConnectionIds":{"type":"array","items":{"type":"string"},"default":[]},"emailSelectionStrategy":{"type":"string","enum":["ROTATE","RANDOM","FIXED"],"x-enumNames":["ROTATE","RANDOM","FIXED"],"default":"ROTATE"},"signature":{"type":"string","nullable":true},"signatureId":{"type":"string","nullable":true},"signatureName":{"type":"string","nullable":true},"defaultSubject":{"type":"string","nullable":true},"followUpSteps":{"type":"array","maxItems":10,"items":{"type":"object","properties":{"delayValue":{"type":"number","minimum":1,"exclusiveMinimum":false},"delayUnit":{"type":"string","enum":["min","hour","day"],"x-enumNames":["MINUTES","HOURS","DAYS"],"default":"min"},"contentMode":{"type":"string","enum":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"x-enumNames":["HUMAN_TEMPLATE","AI_TEMPLATE","HTML"],"default":"HUMAN_TEMPLATE"},"body":{"type":"string","nullable":true},"prompt":{"type":"string","nullable":true}},"required":["delayValue"]},"default":[]},"followUpRespectSchedule":{"type":"boolean","default":true},"followUpOnlyIfNoReply":{"type":"boolean","default":true},"fallbackEnabled":{"type":"boolean","default":false},"fallbackPrompt":{"type":"string","nullable":true},"additionalPrompt":{"type":"string","nullable":true},"restrictionsPrompt":{"type":"string","nullable":true},"useAdditionalRulesOnly":{"type":"boolean","nullable":true,"default":false},"timezone":{"type":"string","nullable":true,"default":"UTC"},"availabilitySchedule":{"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"oneOf":[{"type":"string","enum":["Sunday"]},{"type":"string","enum":["Monday"]},{"type":"string","enum":["Tuesday"]},{"type":"string","enum":["Wednesday"]},{"type":"string","enum":["Thursday"]},{"type":"string","enum":["Friday"]},{"type":"string","enum":["Saturday"]}]},"timeSlots":{"type":"array","items":{"type":"object","properties":{"startTime":{"type":"string","default":"09:00"},"endTime":{"type":"string","default":"17:00"}}}}},"required":["dayOfWeek","timeSlots"]},"default":[{"dayOfWeek":"Monday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Tuesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Wednesday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Thursday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]},{"dayOfWeek":"Friday","timeSlots":[{"startTime":"09:00","endTime":"17:00"}]}]},"retryFollowUp":{"type":"boolean","default":false},"approvalConditions":{"type":"array","items":{"type":"string"},"nullable":true}},"required":["approvalConditions"],"nullable":true},"maxOutgoingConcurrency":{"type":"number","default":10},"maxOutgoingCallsBatchSize":{"type":"number","default":2},"limitOutgoingConcurrency":{"type":"boolean","default":true},"summaryQuestions":{"description":"Post-interaction summary questions. Each question requires a non-empty name; description and options are optional.","type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string","nullable":true},"type":{"type":"string","enum":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"x-enumNames":["OPEN_QUESTION","SINGLE_CHOICE","MULTIPLE_CHOICE","YES_NO","NUMBER","DATE","TIME","LINEAR_SCALE"],"nullable":true,"default":"OPEN_QUESTION"},"options":{"type":"array","items":{"type":"string"},"nullable":true,"default":[]}},"required":["name","options"]},"default":[]},"toolFunctions":{"description":"Callable HTTP or integration actions available during an interaction. Every function definition and every parameter property must include a non-empty description. External tools require apiData; ActivePieces tools require activePieceData.","type":"array","items":{"type":"object","properties":{"catalogId":{"description":"Stable unique id for this tool function in the campaign workflow catalog.","type":"string"},"functionDefinition":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z0-9_-]+$","maxLength":64},"description":{"type":"string"},"parameters":{"type":"object","properties":{"type":{"type":"string","default":"object"},"properties":{"type":"object","additionalProperties":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"}},"required":["type","description"]}},"required":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-zA-Z0-9_]*$"},"default":[]},"additionalProperties":{"type":"boolean","default":false}},"required":["properties"]},"strict":{"type":"boolean","default":true}},"required":["name","description","parameters"]},"apiData":{"type":"object","properties":{"method":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"x-enumNames":["GET","POST","PUT","DELETE","PATCH"],"default":"GET"},"url":{"type":"string","default":""},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"default":[]},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"default":[]},"body":{"type":"string"},"outputParamsSchema":{"type":"string"},"ignoreResponse":{"type":"boolean","default":false},"useRSASignature":{"type":"boolean"},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true}}},"name":{"type":"string"},"apiType":{"type":"string","enum":["EXTERNAL","ACTIVE_PIECE","SYNTHETIC_SYSTEM_API_CALL"],"x-enumNames":["EXTERNAL","ACTIVE_PIECE","SYNTHETIC_SYSTEM_API_CALL"],"default":"EXTERNAL"},"activePieceData":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectionId":{"type":"string","nullable":true},"requestData":{"default":{}},"pieceVersion":{"type":"string","nullable":true},"signRequest":{"oneOf":[{"type":"boolean"},{"type":"string"}],"nullable":true},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true},"actionId":{"type":"string","minLength":1}},"required":["id","actionId"]},"outputParamsSchema":{"type":"string"},"ignoreResponse":{"type":"boolean"}},"required":["functionDefinition","name"]},"default":[]},"triggers":{"description":"Trigger definitions used by trigger and event-driven campaigns.","type":"array","items":{"type":"object","properties":{"catalogId":{"description":"Stable unique id for this trigger in the campaign workflow catalog.","type":"string"},"activePieceTrigger":{"type":"object","properties":{"id":{"type":"string","minLength":1},"connectionId":{"type":"string","nullable":true},"requestData":{"default":{}},"pieceVersion":{"type":"string","nullable":true},"signRequest":{"oneOf":[{"type":"boolean"},{"type":"string"}],"nullable":true},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true},"triggerId":{"type":"string","minLength":1},"triggerStrategy":{"type":"string","enum":["POLLING","WEBHOOK","APP_WEBHOOK"],"x-enumNames":["POLLING","WEBHOOK","APP_WEBHOOK"],"default":"POLLING"}},"required":["id","triggerId"]},"contactMapper":{"default":{}},"type":{"type":"string","enum":["add_contact","archive_contact","inbound_email"],"x-enumNames":["ADD_CONTACT","ARCHIVE_CONTACT","INBOUND_EMAIL"],"nullable":true,"default":"add_contact"}},"required":["activePieceTrigger"]},"default":[]},"preCallActions":{"description":"Actions run before an outbound call. ActivePieces actions require their activePieceAction configuration.","type":"array","items":{"type":"object","properties":{"catalogId":{"description":"Stable unique id for this pre-call action in the campaign workflow catalog. Required for split-traffic versions so multiple instances of the same piece stay distinct.","type":"string"},"activePieceAction":{"description":"The integration action to execute before the call. Contains the piece ID, action ID, connection ID, request data (input payload with {{contact.phoneNumber}}, {{contact.data.fieldName}} interpolation for dynamic values), and piece version.","type":"object","properties":{"id":{"type":"string","minLength":1},"connectionId":{"type":"string","nullable":true},"requestData":{"default":{}},"pieceVersion":{"type":"string","nullable":true},"signRequest":{"oneOf":[{"type":"boolean"},{"type":"string"}],"nullable":true},"timeout":{"type":"number","minimum":0,"exclusiveMinimum":true},"actionId":{"type":"string","minLength":1}},"required":["id","actionId"]},"contactMapper":{"description":"Maps API response fields to contact variables. Keys are camelCase variable names (become {{ variableName }} in scripts), values are dot-notation paths into the API response (e.g., 'data.leadScore').","type":"object","additionalProperties":{"type":"string"},"default":{}},"timeout":{"description":"Timeout in milliseconds for the API call. Default: 5000.","type":"integer","minimum":0,"exclusiveMinimum":true,"default":5000},"executionScope":{"description":"EVERY_ATTEMPT (default): run before every call attempt. ONCE_PER_CONTACT: run only on first attempt, cache results for retries. When ONCE_PER_CONTACT, storeInfo is automatically true.","type":"string","enum":["EVERY_ATTEMPT","ONCE_PER_CONTACT"],"x-enumNames":["EVERY_ATTEMPT","ONCE_PER_CONTACT"],"default":"EVERY_ATTEMPT"},"storeInfo":{"description":"Whether to persist mapped response data on the contact record. Automatically true when executionScope is ONCE_PER_CONTACT. Default: true.","type":"boolean","default":true},"suppressCallOnHttpError":{"description":"Whether to prevent the call when the action returns a 4xx or 5xx HTTP status. Default: false.","type":"boolean","default":false}},"required":["activePieceAction"]},"default":[]},"allowContactDuplicates":{"type":"boolean","default":false},"backgroundNoiseId":{"type":"string","nullable":true,"default":null},"knowledgeBaseIds":{"description":"Knowledge bases available to the campaign. IDs must belong to the authenticated organization.","type":"array","items":{"type":"string"},"default":[]},"campaignGroupId":{"description":"Optional campaign group ID from the authenticated organization.","type":"string","nullable":true,"default":null,"pattern":"^[0-9a-fA-F]{24}$"},"dialingStrategy":{"type":"string","enum":["ROTATE_NUMBERS","PREFER_LOCAL_NUMBERS","AUTO_OPTIMIZE"],"x-enumNames":["ROTATE_NUMBERS","PREFER_LOCAL_NUMBERS","AUTO_OPTIMIZE"],"default":"ROTATE_NUMBERS"},"type":{"description":"Campaign channel: CALL, CHAT, EMAIL, or TRIGGER. Defaults to CALL.","type":"string","enum":["CALL","CHAT","TRIGGER","EMAIL"],"default":"CALL"},"preCallChat":{"type":"object","properties":{"content":{"type":"string"},"allowCallingOutsideWorkingHours":{"type":"boolean"},"responseTimeout":{"type":"number","minimum":1,"exclusiveMinimum":false,"default":300},"nudge":{"type":"boolean","default":false},"noResponseAction":{"type":"string","enum":["PROCEED_VOICE","DO_NOT_CALL"],"x-enumNames":["PROCEED_VOICE","DO_NOT_CALL"],"default":"PROCEED_VOICE"},"refusedCallAction":{"type":"string","enum":["CONTINUE_IN_CHAT","DO_NOT_CALL"],"x-enumNames":["CONTINUE_IN_CHAT","DO_NOT_CALL"],"default":"DO_NOT_CALL"}},"required":["content","allowCallingOutsideWorkingHours"],"nullable":true},"useCase":{"type":"string","nullable":true},"useLocalDnc":{"type":"boolean","nullable":true},"useLocalDialing":{"type":"boolean","nullable":true},"shouldAddToLocalDnc":{"type":"boolean","nullable":true},"sensitiveContentRestricted":{"type":"boolean","default":false},"deleteTranscriptsWithSensitiveData":{"type":"boolean","default":false},"deleteRecordingsWithSensitiveData":{"type":"boolean","default":false},"maskSensitiveMessages":{"type":"boolean","default":false},"turnOffContactMemories":{"type":"boolean","default":false},"turnOffContactMemoryContribution":{"type":"boolean","default":false},"turnOffGlobalContactMemories":{"type":"boolean","default":false},"useCustomContactMemoryPrompt":{"type":"boolean","default":false},"contactMemoryPrompt":{"type":"string","maxLength":2000,"nullable":true},"contactMemoryTextLimit":{"type":"integer","minimum":50,"exclusiveMinimum":false,"maximum":1000,"exclusiveMaximum":false,"nullable":true},"manualInputOnly":{"type":"boolean","default":false},"sendUserEmotionToA2a":{"type":"boolean","default":false},"scriptUpdateRules":{"type":"array","items":{"type":"object","properties":{"event":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"]},"action":{"type":"object","properties":{"type":{"type":"string"},"target":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"nullable":true}},"required":["type"]}},"required":["event","action"]},"default":[]},"ignoredContactVariables":{"type":"array","items":{"type":"string"},"default":[]},"guardrailSettings":{"type":"object","properties":{"enabled":{"type":"boolean","default":false},"useOrganizationGuardrails":{"type":"boolean","default":true},"guardrails":{"type":"array","items":{"type":"object","properties":{"enabled":{"type":"boolean","default":true},"name":{"type":"string"},"prompt":{"type":"string","nullable":true}},"required":["name"]},"default":[]},"validateByChunk":{"type":"boolean","default":false},"onFailAction":{"oneOf":[{"type":"string","enum":["HANGUP","TRANSFER","REGENERATE"],"x-enumNames":["HANGUP","TRANSFER","REGENERATE"]},{"type":"string","enum":[""]}],"default":"HANGUP"},"transfer":{"type":"object","properties":{"message":{"type":"string","nullable":true},"phoneNumberType":{"type":"string","enum":["Phone Number","Contact Field","SIP URI","Human Agent Queue"],"x-enumNames":["PHONE_NUMBER","CONTACT_FIELD","SIP_URI","HUMAN_AGENT_QUEUE"],"nullable":true},"phoneNumber":{"type":"string","nullable":true},"contactAsCallerId":{"type":"boolean","nullable":true},"humanAgentQueueId":{"type":"string","nullable":true},"warmTransfer":{"type":"boolean","nullable":true},"warmTransferAgentOnly":{"type":"boolean","nullable":true},"warmTransferPlayOnDTMF":{"type":"boolean","nullable":true},"warmTransferPrompt":{"type":"string","nullable":true}},"nullable":true}},"nullable":true},"voiceId":{"description":"Convenience alias for callParams.voice. When supplied, this value takes precedence.","type":"string","pattern":"^[0-9a-fA-F]{24}$"},"phoneNumbers":{"description":"Convenience alias for callParams.phonesFrom. When supplied, this list takes precedence; an empty list clears assigned call numbers.","type":"array","items":{"type":"string"}},"webCallCredentials":{"type":"object","properties":{"allowedOrigins":{"type":"array","items":{"type":"string"},"default":[]},"captchaEnabled":{"type":"boolean","nullable":true},"captchaProvider":{"type":"string","nullable":true},"captchaSiteKey":{"type":"string","nullable":true},"captchaSecret":{"type":"string","nullable":true}},"nullable":true},"agentGroupId":{"type":"string","pattern":"^[0-9a-fA-F]{24}$","nullable":true}},"required":["name","useLocalDialing","contactMemoryPrompt"]},"CampaignUpdatePublicDto":{"type":"object","properties":{"name":{"type":"string","minLength":3},"phoneNumbers":{"type":"array","items":{"type":"string"}},"webhooks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":30},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL","POST_PROCESSING_FINISHED:VOICE_MAIL","FORWARDED_CALL_FINISHED","FORWARDED","FORWARDED_CALL:CONNECTED","FORWARDED_CALL:BUSY","FORWARDED_CALL:NO_ANSWER","FORWARDED_CALL:CANCELED","FORWARDED_CALL:FAILED","HANG_UP","DIALING","CONNECTED","FAILED","COULD_NOT_CONNECT:NO_ANSWER","COULD_NOT_CONNECT:BUSY","CALL_FINISHED"],"x-enumNames":["POST_PROCESSING_FINISHED_INTERESTED","POST_PROCESSING_FINISHED_NOT_INTERESTED","POST_PROCESSING_FINISHED_CALL_ME_LATER","POST_PROCESSING_FINISHED_WRONG_NUMBER","POST_PROCESSING_FINISHED_DO_NOT_CALL","POST_PROCESSING_FINISHED_VOICE_MAIL","FORWARDED_CALL_FINISHED","FORWARDED","FORWARDED_CALL_CONNECTED","FORWARDED_CALL_BUSY","FORWARDED_CALL_NO_ANSWER","FORWARDED_CALL_CANCELED","FORWARDED_CALL_FAILED","HANG_UP","DIALING","CONNECTED","FAILED","COULD_NOT_CONNECT_NO_ANSWER","COULD_NOT_CONNECT_BUSY","CALL_FINISHED"]},"default":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL"]},"isAdvanced":{"type":"boolean","default":false},"advancedWebhook":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"x-enumNames":["GET","POST","PUT","DELETE","PATCH"]},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}},"body":{"type":"string","default":""}}}},"required":["url"]}}}},"CampaignInterestCriteriaZodDto":{"type":"object","properties":{"value":{"type":"string","nullable":true},"successCriteria":{"type":"object","properties":{"interested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["INTERESTED","NOT_INTERESTED"],"x-enumNames":["INTERESTED","NOT_INTERESTED"]},"order":{"type":"number"},"default":{"type":"boolean","nullable":true},"immutable":{"type":"boolean","nullable":true}},"required":["name","description","type","order","default","immutable"]},"default":[]},"notInterested":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["INTERESTED","NOT_INTERESTED"],"x-enumNames":["INTERESTED","NOT_INTERESTED"]},"order":{"type":"number"},"default":{"type":"boolean","nullable":true},"immutable":{"type":"boolean","nullable":true}},"required":["name","description","type","order","default","immutable"]},"default":[]}},"nullable":true},"updatedAt":{"oneOf":[{"type":"string"},{}],"nullable":true},"isReviewed":{"type":"boolean"}}},"createSingleContactResponseDto":{"type":"object","properties":{"contactId":{"type":"string","description":"ID of the created or updated contact."},"created":{"type":"boolean","description":"True if a new contact was created."},"modified":{"type":"boolean","description":"True if an existing contact was modified."}},"required":["contactId","created","modified"]},"CampaignContactCreateDto":{"type":"object","properties":{"name":{"type":"string","minLength":1},"phoneNumber":{"type":"string","minLength":7,"maxLength":20,"pattern":"^\\+?[\\d()-]+$"},"phoneNumbers":{"type":"array","items":{"type":"string","minLength":7,"maxLength":20,"pattern":"^\\+?[\\d()-]+$"}},"timezone":{"type":"string"},"data":{"type":"object","additionalProperties":{"type":"string"}},"archived":{"type":"boolean","default":false}},"required":["name","data"]},"ContactDetailsDto":{"type":"object","properties":{"contactId":{"type":"string","description":"Contact ID"},"phoneNumber":{"type":"string","description":"Contact phone number"},"status":{"type":"string","enum":["created","updated"],"description":"Contact status: created (new contact) or updated (existing contact modified)"}},"required":["contactId","phoneNumber","status"]},"createMultipleContactsResponseDto":{"type":"object","properties":{"requested":{"type":"number","description":"Number of contacts received in the request"},"added":{"type":"number","description":"Number of new contacts created"},"modified":{"type":"number","description":"Number of contacts modified"},"contactIds":{"description":"List of IDs for contacts created or modified","type":"array","items":{"type":"string"}},"contactDetails":{"description":"Detailed contact information with phone numbers and status (created/updated). Only included when verbose=true","type":"array","items":{"$ref":"#/components/schemas/ContactDetailsDto"}}},"required":["requested","added","modified","contactIds"]},"BulkContactsCreateDto":{"type":"object","properties":{"contacts":{"description":"Array of contacts to create.","type":"array","items":{"$ref":"#/components/schemas/CampaignContactCreateDto"}}},"required":["contacts"]},"ArchiveContactZodDto":{"type":"object","properties":{"archiveReason":{"description":"Reason for archiving the contact. Cleared when the contact is restored.","type":"string"}},"default":{}},"ArchiveContactsZodDto":{"type":"object","properties":{"archiveReason":{"description":"Reason for archiving the contact. Cleared when the contact is restored.","type":"string"},"contactIds":{"type":"array","items":{"type":"string"}}},"required":["contactIds"]},"ArchiveContactsByPhoneNumbersZodDto":{"oneOf":[{"type":"object","properties":{"archiveReason":{"description":"Reason for archiving the contact. Cleared when the contact is restored.","type":"string"},"phoneNumbers":{"type":"array","items":{"type":"string"}}},"required":["phoneNumbers"]},{"type":"array","items":{"type":"string"}}]},"PublicCampaignReportDto":{"type":"object","properties":{"totalCallsCount":{"type":"number","description":"Total count of calls."}},"required":["totalCallsCount"]},"PublicWebhooksZodDto":{"type":"object","properties":{"name":{"type":"string","maxLength":30},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL","POST_PROCESSING_FINISHED:VOICE_MAIL","FORWARDED_CALL_FINISHED","FORWARDED","FORWARDED_CALL:CONNECTED","FORWARDED_CALL:BUSY","FORWARDED_CALL:NO_ANSWER","FORWARDED_CALL:CANCELED","FORWARDED_CALL:FAILED","HANG_UP","DIALING","CONNECTED","FAILED","COULD_NOT_CONNECT:NO_ANSWER","COULD_NOT_CONNECT:BUSY","CALL_FINISHED"],"x-enumNames":["POST_PROCESSING_FINISHED_INTERESTED","POST_PROCESSING_FINISHED_NOT_INTERESTED","POST_PROCESSING_FINISHED_CALL_ME_LATER","POST_PROCESSING_FINISHED_WRONG_NUMBER","POST_PROCESSING_FINISHED_DO_NOT_CALL","POST_PROCESSING_FINISHED_VOICE_MAIL","FORWARDED_CALL_FINISHED","FORWARDED","FORWARDED_CALL_CONNECTED","FORWARDED_CALL_BUSY","FORWARDED_CALL_NO_ANSWER","FORWARDED_CALL_CANCELED","FORWARDED_CALL_FAILED","HANG_UP","DIALING","CONNECTED","FAILED","COULD_NOT_CONNECT_NO_ANSWER","COULD_NOT_CONNECT_BUSY","CALL_FINISHED"]},"default":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL"]},"isAdvanced":{"type":"boolean","default":false},"advancedWebhook":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","enum":["GET","POST","PUT","DELETE","PATCH"],"x-enumNames":["GET","POST","PUT","DELETE","PATCH"]},"headers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}},"parameters":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]}},"body":{"type":"string","default":""}}}},"required":["url"]},"CallApiStatus":{"type":"string","enum":["INTERESTED","NOT_INTERESTED","VOICE_MAIL","CALL_ME_LATER","DO_NOT_CALL","WRONG_NUMBER","COMPLETED"]},"UploadVocabularyPublicDto":{"type":"object","properties":{"vocabulary":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"object","properties":{"content":{"type":"string","minLength":1},"sounds_like":{"type":"array","maxItems":50,"items":{"type":"string","minLength":1}}},"required":["content"]}}},"required":["vocabulary"]},"RemoveVocabularyWordsPublicDto":{"type":"object","properties":{"words":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"string","minLength":1}}},"required":["words"]},"CampaignGroupPublicDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the agent group. String representation of an ObjectId.","example":"507f1f77bcf86cd799439011"},"name":{"type":"string","description":"Display name of the agent group.","example":"Onboarding Campaigns"},"organizationId":{"type":"string","description":"Id of the organization this agent group belongs to. String representation of an ObjectId.","example":"507f1f77bcf86cd799439012"},"campaignsCount":{"type":"number","description":"Number of agents currently assigned to this agent group.","example":3},"createdAt":{"type":"string","description":"Timestamp when the agent group was created (ISO 8601 string).","format":"date-time","example":"2024-04-09T12:00:00.000Z","nullable":true},"updatedAt":{"type":"string","description":"Timestamp when the agent group was last updated (ISO 8601 string).","format":"date-time","example":"2024-04-09T13:30:00.000Z","nullable":true}},"required":["id","name","organizationId","campaignsCount","createdAt","updatedAt"]},"OrganizationPublicDto":{"type":"object","properties":{"id":{"type":"string","description":"The id of the organization. string representation of a ObjectId."},"name":{"type":"string","description":"The name of the organization."},"createdAt":{"type":"string","description":"The datetime the organization was created in ISO string format.","example":"2021-09-01T00:00:00.000Z"},"parentOrgId":{"type":"string","description":"Id of the parent organization. If the organization is primary, this value is null. If this is a subaccount, will contain the ID of the parent"}},"required":["id","name","createdAt","parentOrgId"]},"SubOrganizationCreatePublicDto":{"type":"object","properties":{"name":{"type":"string","minLength":1},"limits":{"type":"object","properties":{"incomingCalls":{"type":"number","minimum":0,"exclusiveMinimum":false,"nullable":true},"outgoingContacts":{"type":"number","minimum":0,"exclusiveMinimum":false,"nullable":true}},"nullable":true},"retryAttemptsMaxValue":{"type":"number","minimum":1,"exclusiveMinimum":false,"maximum":10,"exclusiveMaximum":false,"nullable":true},"permissions":{"type":"array","items":{"type":"string","enum":["permission_enable_voip_and_phones","permission_enable_manage_members","permission_enable_analytics","permission_enable_api_keys","permission_enable_twilio_integration","permission_enable_cal_com_integration","permission_enable_slack_integration","permission_enable_sip_integration","permission_enable_telnyx_integration","permission_enable_whatsapp_integration","permission_enable_limit_concurrent_calls","permission_enable_view_and_select_phone_numbers","permission_enable_scan_spam_phone_numbers","permission_enable_sensitive_content_restriction","permission_enable_studio_chat","permission_enable_mfa","permission_enable_human_operators"],"x-enumNames":["PERMISSION_ENABLE_VOIP_AND_PHONES","PERMISSION_ENABLE_MANAGE_MEMBERS","PERMISSION_ENABLE_ANALYTICS","PERMISSION_ENABLE_API_KEYS","PERMISSION_ENABLE_TWILIO_INTEGRATION","PERMISSION_ENABLE_CAL_COM_INTEGRATION","PERMISSION_ENABLE_SLACK_INTEGRATION","PERMISSION_ENABLE_SIP_INTEGRATION","PERMISSION_ENABLE_TELNYX_INTEGRATION","PERMISSION_ENABLE_WHATSAPP_INTEGRATION","PERMISSION_ENABLE_LIMIT_CONCURRENT_CALLS","PERMISSION_ENABLE_VIEW_AND_SELECT_PHONE_NUMBERS","PERMISSION_ENABLE_SCAN_SPAM_PHONE_NUMBERS","PERMISSION_ENABLE_SENSITIVE_CONTENT_RESTRICTION","PERMISSION_ENABLE_STUDIO_CHAT","PERMISSION_ENABLE_MFA","PERMISSION_ENABLE_HUMAN_OPERATORS"]}},"webhooks":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL","POST_PROCESSING_FINISHED:VOICE_MAIL","FORWARDED_CALL_FINISHED","FORWARDED","FORWARDED_CALL:CONNECTED","FORWARDED_CALL:BUSY","FORWARDED_CALL:NO_ANSWER","FORWARDED_CALL:CANCELED","FORWARDED_CALL:FAILED","HANG_UP","DIALING","CONNECTED","FAILED","COULD_NOT_CONNECT:NO_ANSWER","COULD_NOT_CONNECT:BUSY","CALL_FINISHED"],"x-enumNames":["POST_PROCESSING_FINISHED_INTERESTED","POST_PROCESSING_FINISHED_NOT_INTERESTED","POST_PROCESSING_FINISHED_CALL_ME_LATER","POST_PROCESSING_FINISHED_WRONG_NUMBER","POST_PROCESSING_FINISHED_DO_NOT_CALL","POST_PROCESSING_FINISHED_VOICE_MAIL","FORWARDED_CALL_FINISHED","FORWARDED","FORWARDED_CALL_CONNECTED","FORWARDED_CALL_BUSY","FORWARDED_CALL_NO_ANSWER","FORWARDED_CALL_CANCELED","FORWARDED_CALL_FAILED","HANG_UP","DIALING","CONNECTED","FAILED","COULD_NOT_CONNECT_NO_ANSWER","COULD_NOT_CONNECT_BUSY","CALL_FINISHED"]},"default":["POST_PROCESSING_FINISHED:INTERESTED","POST_PROCESSING_FINISHED:NOT_INTERESTED","POST_PROCESSING_FINISHED:CALL_ME_LATER","POST_PROCESSING_FINISHED:WRONG_NUMBER","POST_PROCESSING_FINISHED:DO_NOT_CALL"]}},"required":["url"]}}},"required":["name","retryAttemptsMaxValue"]},"SipCarrierCreatePublicDto":{"type":"object","properties":{"name":{"type":"string","minLength":1},"register_username":{"type":"string"},"register_password":{"type":"string"},"requires_register":{"type":"boolean","default":false},"register_sip_realm":{"type":"string"},"register_from_user":{"type":"string"},"register_from_domain":{"type":"string"},"register_public_ip_in_contact":{"type":"boolean"},"tech_prefix":{"type":"string"},"diversion":{"type":"string"},"e164_leading_plus":{"type":"boolean","default":false},"gateways":{"type":"array","items":{"type":"object","properties":{"outbound":{"type":"boolean","default":false},"inbound":{"type":"boolean","default":false},"ipv4":{"type":"string","minLength":4},"netmask":{"type":"integer","minimum":1,"exclusiveMinimum":false,"maximum":32,"exclusiveMaximum":false,"default":32},"port":{"type":"integer","minimum":1,"exclusiveMinimum":false,"maximum":65535,"exclusiveMaximum":false,"default":5060},"protocol":{"type":"string","enum":["udp","tcp","tls","tls/srtp"],"default":"udp"},"send_options_ping":{"type":"boolean"},"use_sips_scheme":{"type":"boolean"},"pad_crypto":{"type":"boolean"},"sip_gateway_sid":{"type":"string","minLength":1}},"required":["ipv4"]},"default":[{"outbound":true,"inbound":false,"ipv4":"","netmask":32,"port":5060,"protocol":"udp","send_options_ping":false,"use_sips_scheme":false,"pad_crypto":false}]},"phoneNumbers":{"type":"array","items":{"type":"object","properties":{"phone_number_sid":{"type":"string","nullable":true},"phone_number":{"type":"string"}},"required":["phone_number"]},"default":[]},"outbound_sip_proxy":{"type":"string"},"updatedBy":{"type":"string","minLength":1},"cps":{"type":"number","minimum":0.1,"exclusiveMinimum":false,"maximum":1000,"exclusiveMaximum":false,"default":10},"isTriggerCarrier":{"type":"boolean"}},"required":["name"]},"AddPhoneNumbersDto":{"type":"object","properties":{"phoneNumbers":{"description":"Array of phone numbers with country codes","example":["14155552671","+442071234567"],"type":"array","items":{"type":"string"}}},"required":["phoneNumbers"]},"VoicePublicDto":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the voice"},"voiceId":{"type":"string","description":"The provider-specific voice ID"},"name":{"type":"string","description":"The name of the voice"},"organizationId":{"type":"string","description":"The organization ID that owns this voice"},"settings":{"type":"object","description":"Additional settings stored in JSON format","example":{"stability":0.8,"style":0.3}},"isMultilingual":{"type":"boolean","description":"Indicates if the voice supports multiple languages"},"supportedLocales":{"description":"Array of supported locale strings","type":"array","items":{"type":"string"}},"ttsClient":{"type":"string","description":"Identifier for the TTS (text-to-speech) client"},"gender":{"type":"string","description":"The gender of the voice","enum":["MALE","FEMALE"]}},"required":["id","voiceId","name","isMultilingual","supportedLocales","ttsClient","gender"]},"VoiceClonePublicZodDto":{"type":"object","properties":{"name":{"type":"string","minLength":5},"description":{"type":"string"},"ttsModel":{"type":"string","minLength":1},"providerType":{"oneOf":[{"type":"string","enum":["ELEVENLABS","CARTESIA","GOOGLE_CLOUD"],"x-enumNames":["ELEVENLABS","CARTESIA","GOOGLE_CLOUD"]},{}]},"supportedLocales":{"type":"array","items":{"type":"string","enum":["en-US","en-GB","en-AU","en-CA","en-IE","en-IN","en-NZ","en-ZA","en-SG","es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","fr-FR","pt-BR","pt-PT","zh-CN","cmn-EN","nl-NL","fi-FI","de-DE","de-AT","de-CH","de-LU","de-LI","gsw-CH","gsw-LI","el-GR","hi-IN","en-TA","id-ID","it-IT","ja-JP","ko-KR","ms-MY","en-MS","ro-RO","ru-RU","kk-KZ","uk-UA","ka-GE","bg-BG","cs-CZ","da-DK","pl-PL","sk-SK","sv-SE","tr-TR","ar-SA","ary-MA","arz-EG","apc-LB","apc-SY","apc-PS","apc-JO","acm-IQ","ar-AE","afb-AE","afb-BH","afb-KW","afb-QA","afb-OM","hr-HR","hr-BA","he-IL","ur-PK","hu-HU","fil-PH","tl","th-TH","vi-VN"],"x-enumNames":["en-US","en-GB","en-AU","en-CA","en-IE","en-IN","en-NZ","en-ZA","en-SG","es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","fr-FR","pt-BR","pt-PT","zh-CN","cmn-EN","nl-NL","fi-FI","de-DE","de-AT","de-CH","de-LU","de-LI","gsw-CH","gsw-LI","el-GR","hi-IN","en-TA","id-ID","it-IT","ja-JP","ko-KR","ms-MY","en-MS","ro-RO","ru-RU","kk-KZ","uk-UA","ka-GE","bg-BG","cs-CZ","da-DK","pl-PL","sk-SK","sv-SE","tr-TR","ar-SA","ary-MA","arz-EG","apc-LB","apc-SY","apc-PS","apc-JO","acm-IQ","ar-AE","afb-AE","afb-BH","afb-KW","afb-QA","afb-OM","hr-HR","hr-BA","he-IL","ur-PK","hu-HU","fil-PH","tl","th-TH","vi-VN"]},"default":["en-US"]},"subAccounts":{"type":"boolean","default":false},"stability":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false},"similarityBoost":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false},"speed":{"type":"number","minimum":-1,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false},"supportsAllLanguages":{"type":"boolean","default":false}},"required":["name","providerType","supportedLocales","subAccounts","stability","similarityBoost","speed","supportsAllLanguages"]},"VoiceCreatePublicZodDto":{"type":"object","properties":{"name":{"type":"string","minLength":5},"voiceId":{"type":"string","minLength":1},"ttsModel":{"type":"string","minLength":1},"isMultilingual":{"type":"boolean","default":false},"supportedLocales":{"type":"array","items":{"type":"string","enum":["en-US","en-GB","en-AU","en-CA","en-IE","en-IN","en-NZ","en-ZA","en-SG","es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","fr-FR","pt-BR","pt-PT","zh-CN","cmn-EN","nl-NL","fi-FI","de-DE","de-AT","de-CH","de-LU","de-LI","gsw-CH","gsw-LI","el-GR","hi-IN","en-TA","id-ID","it-IT","ja-JP","ko-KR","ms-MY","en-MS","ro-RO","ru-RU","kk-KZ","uk-UA","ka-GE","bg-BG","cs-CZ","da-DK","pl-PL","sk-SK","sv-SE","tr-TR","ar-SA","ary-MA","arz-EG","apc-LB","apc-SY","apc-PS","apc-JO","acm-IQ","ar-AE","afb-AE","afb-BH","afb-KW","afb-QA","afb-OM","hr-HR","hr-BA","he-IL","ur-PK","hu-HU","fil-PH","tl","th-TH","vi-VN"],"x-enumNames":["en-US","en-GB","en-AU","en-CA","en-IE","en-IN","en-NZ","en-ZA","en-SG","es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","fr-FR","pt-BR","pt-PT","zh-CN","cmn-EN","nl-NL","fi-FI","de-DE","de-AT","de-CH","de-LU","de-LI","gsw-CH","gsw-LI","el-GR","hi-IN","en-TA","id-ID","it-IT","ja-JP","ko-KR","ms-MY","en-MS","ro-RO","ru-RU","kk-KZ","uk-UA","ka-GE","bg-BG","cs-CZ","da-DK","pl-PL","sk-SK","sv-SE","tr-TR","ar-SA","ary-MA","arz-EG","apc-LB","apc-SY","apc-PS","apc-JO","acm-IQ","ar-AE","afb-AE","afb-BH","afb-KW","afb-QA","afb-OM","hr-HR","hr-BA","he-IL","ur-PK","hu-HU","fil-PH","tl","th-TH","vi-VN"]}},"voiceProviderType":{"type":"string","enum":["ELEVENLABS","CARTESIA","GOOGLE_CLOUD"],"x-enumNames":["ELEVENLABS","CARTESIA","GOOGLE_CLOUD"]},"settings":{"type":"object","properties":{"stability":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.5},"similarity_boost":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.75},"speed":{"type":"number","minimum":-1,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false}},"default":{}},"subAccounts":{"type":"boolean","default":false},"gender":{"type":"string","enum":["MALE","FEMALE"],"x-enumNames":["MALE","FEMALE"]}},"required":["name","voiceId","voiceProviderType","gender"]},"VoiceUpdatePublicZodDto":{"type":"object","properties":{"name":{"type":"string","minLength":5},"ttsModel":{"type":"string","minLength":1},"isMultilingual":{"type":"boolean"},"supportedLocales":{"type":"array","items":{"type":"string","enum":["en-US","en-GB","en-AU","en-CA","en-IE","en-IN","en-NZ","en-ZA","en-SG","es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","fr-FR","pt-BR","pt-PT","zh-CN","cmn-EN","nl-NL","fi-FI","de-DE","de-AT","de-CH","de-LU","de-LI","gsw-CH","gsw-LI","el-GR","hi-IN","en-TA","id-ID","it-IT","ja-JP","ko-KR","ms-MY","en-MS","ro-RO","ru-RU","kk-KZ","uk-UA","ka-GE","bg-BG","cs-CZ","da-DK","pl-PL","sk-SK","sv-SE","tr-TR","ar-SA","ary-MA","arz-EG","apc-LB","apc-SY","apc-PS","apc-JO","acm-IQ","ar-AE","afb-AE","afb-BH","afb-KW","afb-QA","afb-OM","hr-HR","hr-BA","he-IL","ur-PK","hu-HU","fil-PH","tl","th-TH","vi-VN"],"x-enumNames":["en-US","en-GB","en-AU","en-CA","en-IE","en-IN","en-NZ","en-ZA","en-SG","es-ES","es-MX","es-AR","es-CO","es-CL","es-PE","fr-FR","pt-BR","pt-PT","zh-CN","cmn-EN","nl-NL","fi-FI","de-DE","de-AT","de-CH","de-LU","de-LI","gsw-CH","gsw-LI","el-GR","hi-IN","en-TA","id-ID","it-IT","ja-JP","ko-KR","ms-MY","en-MS","ro-RO","ru-RU","kk-KZ","uk-UA","ka-GE","bg-BG","cs-CZ","da-DK","pl-PL","sk-SK","sv-SE","tr-TR","ar-SA","ary-MA","arz-EG","apc-LB","apc-SY","apc-PS","apc-JO","acm-IQ","ar-AE","afb-AE","afb-BH","afb-KW","afb-QA","afb-OM","hr-HR","hr-BA","he-IL","ur-PK","hu-HU","fil-PH","tl","th-TH","vi-VN"]}},"settings":{"type":"object","properties":{"stability":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.5},"similarity_boost":{"type":"number","minimum":0,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false,"default":0.75},"speed":{"type":"number","minimum":-1,"exclusiveMinimum":false,"maximum":1,"exclusiveMaximum":false}}},"gender":{"type":"string","enum":["MALE","FEMALE"],"x-enumNames":["MALE","FEMALE"]}}},"WarmTransferPublicDto":{"type":"object","properties":{"agentOnly":{"type":"boolean","default":false}}},"ContactMemoryPublicDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier for the memory","example":"507f1f77bcf86cd799439011"},"name":{"type":"string","description":"Display name for the memory item","example":"Communication Preference"},"text":{"type":"string","description":"The content/text of the memory","example":"Customer prefers email contact"},"status":{"type":"string","description":"Status of the memory","enum":["ACTUAL","OUTDATED","DELETED"],"example":"ACTUAL"},"phoneNumber":{"type":"string","description":"Phone number associated with this memory","example":"14155552671"},"campaignId":{"type":"string","description":"Campaign ID associated with this memory","example":"507f1f77bcf86cd799439011"},"agentId":{"type":"string","description":"Agent ID associated with this memory","example":"507f1f77bcf86cd799439011"},"contactId":{"type":"string","description":"Contact ID if memory is associated with a contact","example":"507f1f77bcf86cd799439011"},"previousMemoryId":{"type":"string","description":"ID of the previous version of this memory (if updated)","example":"507f1f77bcf86cd799439011"},"createdAt":{"type":"string","description":"Timestamp when the memory was created","format":"date-time","example":"2024-04-09T12:00:00.000Z"},"updatedAt":{"type":"string","description":"Timestamp when the memory was last updated","format":"date-time","example":"2024-04-09T13:30:00.000Z"}},"required":["id","name","text","status","phoneNumber","campaignId","agentId","createdAt"]},"CreateContactMemoryPublicDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["name","text"]},"UpdateContactMemoryPublicDto":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":5000}},"required":["text"]},"BackgroundNoisePublicDto":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the background sound"},"name":{"type":"string","description":"Display name of the background sound","example":"Cafe ambience"},"organizationId":{"type":"string","description":"Organization that owns this background sound. Null for built-in presets available to all organizations.","nullable":true},"source":{"type":"string","description":"How this background sound was created. USER = uploaded through the dashboard, API_KEY = uploaded through the public API, SYSTEM = built-in preset.","enum":["USER","API_KEY","SYSTEM"]},"createdBy":{"type":"string","description":"User ID of the uploader. Only populated when source is USER; null for API_KEY and SYSTEM uploads.","nullable":true},"createdAt":{"type":"string","description":"Timestamp when the background sound was created","format":"date-time"}},"required":["id","name"]},"BackgroundNoiseUpdateZodDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]}}}}