2
0
Files
bot/apps/docs/openapi/chat/_spec_.json
Baptiste Arnaud b81fcf0167 Auto continue bot on whatsApp if starting block is input (#849)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
### Summary by CodeRabbit

**New Features:**
- Added WhatsApp integration feature to the Pro plan.

**Refactor:**
- Introduced the ability to exclude specific plans from being displayed
in the Change Plan Modal.
- Renamed the function `isProPlan` to `hasProPerks`, enhancing code
readability and maintainability.
- Updated the `EmbedButton` component to handle a new `lockTagPlan`
property and use the `modal` function instead of the `Modal` component.

**Chore:**
- Removed the `whatsAppPhoneNumberId` field from the `Typebot` model
across various files, simplifying the data structure of the model.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2023-09-25 17:20:42 +02:00

7028 lines
386 KiB
JSON

{
"openapi": "3.0.3",
"info": {
"title": "Chat API",
"version": "1.0.0"
},
"servers": [
{
"url": "https://typebot.io/api/v1"
}
],
"paths": {
"/sendMessage": {
"post": {
"operationId": "sendMessage",
"summary": "Send a message",
"description": "To initiate a chat, do not provide a `sessionId` nor a `message`.\n\nContinue the conversation by providing the `sessionId` and the `message` that should answer the previous question.\n\nSet the `isPreview` option to `true` to chat with the non-published version of the typebot.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "The answer to the previous chat input. Do not provide it if you are starting a new chat."
},
"sessionId": {
"type": "string",
"description": "Session ID that you get from the initial chat request to a bot. If not provided, it will create a new session."
},
"startParams": {
"type": "object",
"properties": {
"typebot": {
"anyOf": [
{
"type": "object",
"properties": {
"version": {
"type": "string",
"enum": [
"3",
"4",
"5"
],
"nullable": true
},
"id": {
"type": "string"
},
"groups": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
},
"graphCoordinates": {
"type": "object",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
}
},
"required": [
"x",
"y"
],
"additionalProperties": false
},
"blocks": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"start"
]
},
"label": {
"type": "string"
}
},
"required": [
"id",
"groupId",
"type",
"label"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text"
]
},
"content": {
"type": "object",
"properties": {
"html": {
"type": "string"
},
"richText": {
"type": "array"
},
"plainText": {
"type": "string"
}
},
"required": [
"richText"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"image"
]
},
"content": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"clickLink": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"alt": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"video"
]
},
"content": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"url",
"youtube",
"vimeo"
]
}
},
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"embed"
]
},
"content": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"height": {
"anyOf": [
{
"type": "number"
},
{}
]
}
},
"required": [
"height"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"audio"
]
},
"content": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"isAutoplayEnabled": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text input"
]
},
"options": {
"type": "object",
"properties": {
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"variableId": {
"type": "string"
},
"isLong": {
"type": "boolean"
}
},
"required": [
"labels",
"isLong"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"choice input"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blockId": {
"type": "string",
"description": "Deprecated"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
0
]
},
"content": {
"type": "string"
},
"displayCondition": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"condition": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with",
"Matches regex",
"Does not match regex"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": [
"id",
"type"
],
"additionalProperties": false
}
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isMultipleChoice": {
"type": "boolean"
},
"buttonLabel": {
"type": "string"
},
"dynamicVariableId": {
"type": "string"
},
"isSearchable": {
"type": "boolean"
},
"searchInputPlaceholder": {
"type": "string"
}
},
"required": [
"isMultipleChoice",
"buttonLabel"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"items",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"email input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"retryMessageContent": {
"type": "string"
}
},
"required": [
"labels"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"number input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"min": {
"anyOf": [
{
"type": "number"
},
{}
]
},
"max": {
"anyOf": [
{
"type": "number"
},
{}
]
},
"step": {
"anyOf": [
{
"type": "number"
},
{}
]
}
},
"required": [
"labels"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"url input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"retryMessageContent": {
"type": "string"
}
},
"required": [
"labels",
"retryMessageContent"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"phone number input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"retryMessageContent": {
"type": "string"
},
"defaultCountryCode": {
"type": "string"
}
},
"required": [
"labels",
"retryMessageContent"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"date input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"button": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"button",
"from",
"to"
],
"additionalProperties": false
},
"hasTime": {
"type": "boolean"
},
"isRange": {
"type": "boolean"
},
"format": {
"type": "string"
},
"min": {
"type": "string"
},
"max": {
"type": "string"
}
},
"required": [
"labels",
"hasTime",
"isRange"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"payment input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"provider": {
"type": "string",
"enum": [
"Stripe"
]
},
"labels": {
"type": "object",
"properties": {
"button": {
"type": "string"
},
"success": {
"type": "string"
}
},
"required": [
"button"
],
"additionalProperties": false
},
"additionalInformation": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"phoneNumber": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"country": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"state": {
"type": "string"
},
"city": {
"type": "string"
},
"postalCode": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"credentialsId": {
"type": "string"
},
"currency": {
"type": "string"
},
"amount": {
"type": "string"
},
"retryMessageContent": {
"type": "string"
}
},
"required": [
"provider",
"labels",
"currency"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"rating input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"buttonType": {
"anyOf": [
{
"type": "string",
"enum": [
"Icons"
]
},
{
"type": "string",
"enum": [
"Numbers"
]
}
]
},
"length": {
"type": "number"
},
"labels": {
"type": "object",
"properties": {
"left": {
"type": "string"
},
"right": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"button"
],
"additionalProperties": false
},
"customIcon": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"svg": {
"type": "string"
}
},
"required": [
"isEnabled"
],
"additionalProperties": false
},
"isOneClickSubmitEnabled": {
"type": "boolean"
}
},
"required": [
"buttonType",
"length",
"labels",
"customIcon"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"file input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isRequired": {
"type": "boolean"
},
"isMultipleAllowed": {
"type": "boolean"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
},
"clear": {
"type": "string"
},
"skip": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"sizeLimit": {
"type": "number",
"description": "Deprecated"
}
},
"required": [
"isMultipleAllowed",
"labels"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"picture choice input"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blockId": {
"type": "string",
"description": "Deprecated"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
3
]
},
"pictureSrc": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"displayCondition": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"condition": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with",
"Matches regex",
"Does not match regex"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": [
"id",
"type"
],
"additionalProperties": false
}
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isMultipleChoice": {
"type": "boolean"
},
"isSearchable": {
"type": "boolean"
},
"buttonLabel": {
"type": "string"
},
"searchInputPlaceholder": {
"type": "string"
},
"dynamicItems": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"titlesVariableId": {
"type": "string"
},
"descriptionsVariableId": {
"type": "string"
},
"pictureSrcsVariableId": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"buttonLabel",
"searchInputPlaceholder"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"items",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Code"
]
},
"options": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"content": {
"type": "string"
},
"shouldExecuteInParentContext": {
"type": "boolean"
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Condition"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blockId": {
"type": "string",
"description": "Deprecated"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
1
]
},
"content": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with",
"Matches regex",
"Does not match regex"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
}
},
"required": [
"id",
"type",
"content"
],
"additionalProperties": false
}
}
},
"required": [
"id",
"groupId",
"type",
"items"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Redirect"
]
},
"options": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"isNewTab": {
"type": "boolean"
}
},
"required": [
"isNewTab"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Set variable"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"expressionToEvaluate": {
"type": "string"
},
"isCode": {
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"Custom",
"Empty",
"User ID",
"Now",
"Today",
"Yesterday",
"Tomorrow",
"Random ID",
"Moment of the day",
"Map item with same index",
"Phone number",
"Contact name"
]
},
"mapListItemParams": {
"type": "object",
"properties": {
"baseItemVariableId": {
"type": "string"
},
"baseListVariableId": {
"type": "string"
},
"targetListVariableId": {
"type": "string"
}
},
"additionalProperties": false
},
"isExecutedOnClient": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Typebot link"
]
},
"options": {
"type": "object",
"properties": {
"typebotId": {
"type": "string"
},
"groupId": {
"type": "string"
},
"mergeResults": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Wait"
]
},
"options": {
"type": "object",
"properties": {
"secondsToWaitFor": {
"type": "string"
},
"shouldPause": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Jump"
]
},
"options": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"blockId": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"AB test"
]
},
"items": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"items": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blockId": {
"type": "string",
"description": "Deprecated"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
2
]
},
"path": {
"type": "string",
"enum": [
"a"
]
}
},
"required": [
"id",
"type",
"path"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blockId": {
"type": "string",
"description": "Deprecated"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
2
]
},
"path": {
"type": "string",
"enum": [
"b"
]
}
},
"required": [
"id",
"type",
"path"
],
"additionalProperties": false
}
]
},
"options": {
"type": "object",
"properties": {
"aPercent": {
"type": "number",
"minimum": 0,
"maximum": 100
}
},
"required": [
"aPercent"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"items",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Chatwoot"
]
},
"options": {
"type": "object",
"properties": {
"task": {
"type": "string",
"enum": [
"Show widget",
"Close widget"
]
},
"baseUrl": {
"type": "string"
},
"websiteToken": {
"type": "string"
},
"user": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"avatarUrl": {
"type": "string"
},
"phoneNumber": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"baseUrl",
"websiteToken"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Google Analytics"
]
},
"options": {
"type": "object",
"properties": {
"trackingId": {
"type": "string"
},
"category": {
"type": "string"
},
"action": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
{}
]
},
"sendTo": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Google Sheets"
]
},
"options": {
"anyOf": [
{
"type": "object",
"properties": {
"credentialsId": {
"type": "string"
},
"sheetId": {
"type": "string"
},
"spreadsheetId": {
"type": "string"
},
"action": {
"type": "string",
"enum": [
"Get data from sheet"
]
},
"referenceCell": {
"type": "object",
"properties": {
"column": {
"type": "string"
},
"value": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
},
"filter": {
"type": "object",
"properties": {
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"column": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with",
"Matches regex",
"Does not match regex"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
}
},
"required": [
"comparisons",
"logicalOperator"
],
"additionalProperties": false
},
"cellsToExtract": {
"type": "array",
"items": {
"type": "object",
"properties": {
"column": {
"type": "string"
},
"id": {
"type": "string"
},
"variableId": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"totalRowsToExtract": {
"type": "string",
"enum": [
"All",
"First",
"Last",
"Random"
]
}
},
"required": [
"action",
"cellsToExtract"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"credentialsId": {
"type": "string"
},
"sheetId": {
"type": "string"
},
"spreadsheetId": {
"type": "string"
},
"action": {
"type": "string",
"enum": [
"Insert a row"
]
},
"cellsToInsert": {
"type": "array",
"items": {
"type": "object",
"properties": {
"column": {
"type": "string"
},
"value": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"action",
"cellsToInsert"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"credentialsId": {
"type": "string"
},
"sheetId": {
"type": "string"
},
"spreadsheetId": {
"type": "string"
},
"action": {
"type": "string",
"enum": [
"Update a row"
]
},
"cellsToUpsert": {
"type": "array",
"items": {
"type": "object",
"properties": {
"column": {
"type": "string"
},
"value": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"referenceCell": {
"type": "object",
"properties": {
"column": {
"type": "string"
},
"value": {
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false,
"description": "Deprecated. Use `filter` instead."
},
"filter": {
"type": "object",
"properties": {
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"column": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with",
"Matches regex",
"Does not match regex"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
}
},
"required": [
"comparisons",
"logicalOperator"
],
"additionalProperties": false
}
},
"required": [
"action",
"cellsToUpsert"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"credentialsId": {
"type": "string"
},
"sheetId": {
"type": "string"
},
"spreadsheetId": {
"type": "string"
},
"action": {
"not": {}
}
},
"additionalProperties": false
}
]
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Make.com"
]
},
"options": {
"type": "object",
"properties": {
"variablesForTest": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"responseVariableMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"bodyPath": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"isAdvancedConfig": {
"type": "boolean"
},
"isCustomBody": {
"type": "boolean"
},
"isExecutedOnClient": {
"type": "boolean"
},
"webhook": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"queryParams": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"CONNECT",
"OPTIONS",
"TRACE"
]
},
"url": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"id",
"queryParams",
"headers",
"method"
],
"additionalProperties": false
}
},
"required": [
"variablesForTest",
"responseVariableMapping"
],
"additionalProperties": false
},
"webhookId": {
"type": "string",
"description": "Deprecated, use webhook.id instead"
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"OpenAI"
]
},
"options": {
"anyOf": [
{
"type": "object",
"properties": {
"task": {
"not": {}
},
"credentialsId": {
"type": "string"
},
"baseUrl": {
"type": "string",
"default": "https://api.openai.com/v1"
},
"apiVersion": {
"type": "string"
}
},
"additionalProperties": false
},
{
"type": "object",
"properties": {
"task": {
"type": "string",
"enum": [
"Create chat completion"
]
},
"model": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"role": {
"type": "string",
"enum": [
"system",
"user",
"assistant"
]
},
"content": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"role": {
"type": "string",
"enum": [
"Messages sequence ✨"
]
},
"content": {
"type": "object",
"properties": {
"assistantMessagesVariableId": {
"type": "string"
},
"userMessagesVariableId": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"id",
"role"
],
"additionalProperties": false
}
]
}
},
"advancedSettings": {
"type": "object",
"properties": {
"temperature": {
"anyOf": [
{
"type": "number"
},
{}
]
}
},
"additionalProperties": false
},
"responseMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"valueToExtract": {
"type": "string",
"enum": [
"Message content",
"Total tokens"
]
},
"variableId": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"credentialsId": {
"type": "string"
},
"baseUrl": {
"type": "string",
"default": "https://api.openai.com/v1"
},
"apiVersion": {
"type": "string"
}
},
"required": [
"task",
"model",
"messages",
"responseMapping"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"task": {
"type": "string",
"enum": [
"Create image"
]
},
"prompt": {
"type": "string"
},
"advancedOptions": {
"type": "object",
"properties": {
"size": {
"type": "string",
"enum": [
"256x256",
"512x512",
"1024x1024"
]
}
},
"additionalProperties": false
},
"responseMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"valueToExtract": {
"type": "string",
"enum": [
"Image URL"
]
},
"variableId": {
"type": "string"
}
},
"required": [
"id",
"valueToExtract"
],
"additionalProperties": false
}
},
"credentialsId": {
"type": "string"
},
"baseUrl": {
"type": "string",
"default": "https://api.openai.com/v1"
},
"apiVersion": {
"type": "string"
}
},
"required": [
"task",
"advancedOptions",
"responseMapping"
],
"additionalProperties": false
}
]
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Pabbly"
]
},
"options": {
"type": "object",
"properties": {
"variablesForTest": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"responseVariableMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"bodyPath": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"isAdvancedConfig": {
"type": "boolean"
},
"isCustomBody": {
"type": "boolean"
},
"isExecutedOnClient": {
"type": "boolean"
},
"webhook": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"queryParams": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"CONNECT",
"OPTIONS",
"TRACE"
]
},
"url": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"id",
"queryParams",
"headers",
"method"
],
"additionalProperties": false
}
},
"required": [
"variablesForTest",
"responseVariableMapping"
],
"additionalProperties": false
},
"webhookId": {
"type": "string",
"description": "Deprecated, use webhook.id instead"
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Email"
]
},
"options": {
"type": "object",
"properties": {
"credentialsId": {
"type": "string"
},
"isCustomBody": {
"type": "boolean"
},
"isBodyCode": {
"type": "boolean"
},
"recipients": {
"type": "array",
"items": {
"type": "string"
}
},
"subject": {
"type": "string"
},
"body": {
"type": "string"
},
"replyTo": {
"type": "string"
},
"cc": {
"type": "array",
"items": {
"type": "string"
}
},
"bcc": {
"type": "array",
"items": {
"type": "string"
}
},
"attachmentsVariableId": {
"type": "string"
}
},
"required": [
"credentialsId",
"recipients"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Webhook"
]
},
"options": {
"type": "object",
"properties": {
"variablesForTest": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"responseVariableMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"bodyPath": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"isAdvancedConfig": {
"type": "boolean"
},
"isCustomBody": {
"type": "boolean"
},
"isExecutedOnClient": {
"type": "boolean"
},
"webhook": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"queryParams": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"CONNECT",
"OPTIONS",
"TRACE"
]
},
"url": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"id",
"queryParams",
"headers",
"method"
],
"additionalProperties": false
}
},
"required": [
"variablesForTest",
"responseVariableMapping"
],
"additionalProperties": false
},
"webhookId": {
"type": "string",
"description": "Deprecated, now integrated in webhook block options"
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Zapier"
]
},
"options": {
"type": "object",
"properties": {
"variablesForTest": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"responseVariableMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"bodyPath": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"isAdvancedConfig": {
"type": "boolean"
},
"isCustomBody": {
"type": "boolean"
},
"isExecutedOnClient": {
"type": "boolean"
},
"webhook": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"queryParams": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"CONNECT",
"OPTIONS",
"TRACE"
]
},
"url": {
"type": "string"
},
"body": {
"type": "string"
}
},
"required": [
"id",
"queryParams",
"headers",
"method"
],
"additionalProperties": false
}
},
"required": [
"variablesForTest",
"responseVariableMapping"
],
"additionalProperties": false
},
"webhookId": {
"type": "string",
"description": "Deprecated, use webhook.id instead"
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Pixel"
]
},
"options": {
"anyOf": [
{
"type": "object",
"properties": {
"pixelId": {
"type": "string"
},
"isInitSkip": {
"type": "boolean"
},
"params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"eventType": {
"not": {}
}
},
"additionalProperties": false
},
{
"type": "object",
"properties": {
"pixelId": {
"type": "string"
},
"isInitSkip": {
"type": "boolean"
},
"params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"eventType": {
"type": "string",
"enum": [
"Lead",
"Contact",
"CompleteRegistration",
"Schedule",
"SubmitApplication",
"ViewContent",
"AddPaymentInfo",
"AddToCart",
"AddToWishlist",
"CustomizeProduct",
"Donate",
"FindLocation",
"InitiateCheckout",
"Purchase",
"Search",
"StartTrial",
"Subscribe"
]
}
},
"required": [
"eventType"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"pixelId": {
"type": "string"
},
"isInitSkip": {
"type": "boolean"
},
"params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"eventType": {
"type": "string",
"enum": [
"Custom"
]
},
"name": {
"type": "string"
}
},
"required": [
"eventType"
],
"additionalProperties": false
}
]
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"Zemantic AI"
]
},
"blockId": {
"type": "string"
},
"options": {
"type": "object",
"properties": {
"credentialsId": {
"type": "string"
},
"projectId": {
"type": "string"
},
"systemPrompt": {
"type": "string"
},
"prompt": {
"type": "string"
},
"query": {
"type": "string"
},
"maxResults": {
"type": "integer"
},
"responseMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"valueToExtract": {
"type": "string",
"enum": [
"Summary",
"Results"
]
},
"variableId": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"responseMapping"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
}
]
}
}
},
"required": [
"id",
"title",
"graphCoordinates",
"blocks"
],
"additionalProperties": false
}
},
"edges": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"from": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"blockId": {
"type": "string"
},
"itemId": {
"type": "string"
}
},
"required": [
"groupId",
"blockId"
],
"additionalProperties": false
},
"to": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"blockId": {
"type": "string"
}
},
"required": [
"groupId"
],
"additionalProperties": false
}
},
"required": [
"id",
"from",
"to"
],
"additionalProperties": false
}
},
"variables": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
],
"nullable": true
}
},
"required": [
"id",
"name"
],
"additionalProperties": false
}
},
"settings": {
"type": "object",
"properties": {
"general": {
"type": "object",
"properties": {
"isBrandingEnabled": {
"type": "boolean"
},
"isTypingEmulationEnabled": {
"type": "boolean"
},
"isInputPrefillEnabled": {
"type": "boolean"
},
"isHideQueryParamsEnabled": {
"type": "boolean"
},
"isNewResultOnRefreshEnabled": {
"type": "boolean"
},
"rememberUser": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"storage": {
"type": "string",
"enum": [
"session",
"local"
]
}
},
"additionalProperties": false
}
},
"required": [
"isBrandingEnabled"
],
"additionalProperties": false
},
"typingEmulation": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"speed": {
"type": "number"
},
"maxDelay": {
"type": "number"
}
},
"required": [
"enabled",
"speed",
"maxDelay"
],
"additionalProperties": false
},
"metadata": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"imageUrl": {
"type": "string"
},
"favIconUrl": {
"type": "string"
},
"customHeadCode": {
"type": "string"
},
"googleTagManagerId": {
"type": "string"
}
},
"additionalProperties": false
},
"whatsApp": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"startCondition": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with",
"Matches regex",
"Does not match regex"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
},
"sessionExpiryTimeout": {
"type": "number",
"maximum": 48,
"minimum": 0.01,
"description": "Expiration delay in hours after latest interaction"
}
},
"additionalProperties": false
}
},
"required": [
"general",
"typingEmulation",
"metadata"
],
"additionalProperties": false
},
"theme": {
"type": "object",
"properties": {
"general": {
"type": "object",
"properties": {
"font": {
"type": "string"
},
"background": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Color",
"Image",
"None"
]
},
"content": {
"type": "string"
}
},
"required": [
"type"
],
"additionalProperties": false
}
},
"required": [
"font",
"background"
],
"additionalProperties": false
},
"chat": {
"type": "object",
"properties": {
"hostAvatar": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"url": {
"type": "string"
}
},
"required": [
"isEnabled"
],
"additionalProperties": false
},
"guestAvatar": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"url": {
"type": "string"
}
},
"required": [
"isEnabled"
],
"additionalProperties": false
},
"hostBubbles": {
"type": "object",
"properties": {
"backgroundColor": {
"type": "string"
},
"color": {
"type": "string"
}
},
"required": [
"backgroundColor",
"color"
],
"additionalProperties": false
},
"guestBubbles": {
"type": "object",
"properties": {
"backgroundColor": {
"type": "string"
},
"color": {
"type": "string"
}
},
"required": [
"backgroundColor",
"color"
],
"additionalProperties": false
},
"buttons": {
"type": "object",
"properties": {
"backgroundColor": {
"type": "string"
},
"color": {
"type": "string"
}
},
"required": [
"backgroundColor",
"color"
],
"additionalProperties": false
},
"inputs": {
"type": "object",
"properties": {
"backgroundColor": {
"type": "string"
},
"color": {
"type": "string"
},
"placeholderColor": {
"type": "string"
}
},
"required": [
"backgroundColor",
"color",
"placeholderColor"
],
"additionalProperties": false
},
"roundness": {
"type": "string",
"enum": [
"none",
"medium",
"large"
]
}
},
"required": [
"hostBubbles",
"guestBubbles",
"buttons",
"inputs"
],
"additionalProperties": false
},
"customCss": {
"type": "string"
}
},
"required": [
"general",
"chat"
],
"additionalProperties": false
}
},
"required": [
"version",
"id",
"groups",
"edges",
"variables",
"settings",
"theme"
],
"additionalProperties": false
},
{
"type": "string"
}
],
"description": "Either a Typebot ID or a Typebot object. If you provide a Typebot object, it will be executed in preview mode. ([How can I find my typebot ID?](https://docs.typebot.io/api#how-to-find-my-typebotid))."
},
"isPreview": {
"type": "boolean",
"description": "If set to `true`, it will start a Preview session with the unpublished bot and it won't be saved in the Results tab. You need to be authenticated with a bearer token for this to work."
},
"resultId": {
"type": "string",
"description": "Provide it if you'd like to overwrite an existing result."
},
"startGroupId": {
"type": "string",
"description": "Start chat from a specific group."
},
"prefilledVariables": {
"type": "object",
"additionalProperties": {},
"description": "[More info about prefilled variables.](https://docs.typebot.io/editor/variables#prefilled-variables)"
},
"isStreamEnabled": {
"type": "boolean",
"description": "Set this to `true` if you intend to stream OpenAI completions on a client."
},
"isOnlyRegistering": {
"type": "boolean",
"description": "If set to `true`, it will only register the session and not start the chat. This is used for other chat platform integration as it can require a session to be registered before sending the first message."
}
},
"required": [
"typebot"
],
"additionalProperties": false
},
"clientLogs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"description": {
"type": "string"
},
"details": {}
},
"required": [
"status",
"description"
],
"additionalProperties": false
},
"description": "Logs while executing client side actions"
}
},
"additionalProperties": false
}
}
}
},
"parameters": [],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
{
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"text"
]
},
"content": {
"type": "object",
"properties": {
"html": {
"type": "string"
},
"richText": {
"type": "array"
},
"plainText": {
"type": "string"
}
},
"required": [
"richText"
],
"additionalProperties": false
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"image"
]
},
"content": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"clickLink": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"alt": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"video"
]
},
"content": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"url",
"youtube",
"vimeo"
]
}
},
"additionalProperties": false
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"audio"
]
},
"content": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"isAutoplayEnabled": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"embed"
]
},
"content": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"height": {
"type": "number"
}
},
"additionalProperties": false
}
},
"required": [
"type",
"content"
],
"additionalProperties": false
}
]
}
]
}
},
"input": {
"allOf": [
{
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text input"
]
},
"options": {
"type": "object",
"properties": {
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"variableId": {
"type": "string"
},
"isLong": {
"type": "boolean"
}
},
"required": [
"labels",
"isLong"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"choice input"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blockId": {
"type": "string",
"description": "Deprecated"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
0
]
},
"content": {
"type": "string"
},
"displayCondition": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"condition": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with",
"Matches regex",
"Does not match regex"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": [
"id",
"type"
],
"additionalProperties": false
}
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isMultipleChoice": {
"type": "boolean"
},
"buttonLabel": {
"type": "string"
},
"dynamicVariableId": {
"type": "string"
},
"isSearchable": {
"type": "boolean"
},
"searchInputPlaceholder": {
"type": "string"
}
},
"required": [
"isMultipleChoice",
"buttonLabel"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"items",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"email input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"retryMessageContent": {
"type": "string"
}
},
"required": [
"labels"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"number input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"min": {
"anyOf": [
{
"type": "number"
},
{}
]
},
"max": {
"anyOf": [
{
"type": "number"
},
{}
]
},
"step": {
"anyOf": [
{
"type": "number"
},
{}
]
}
},
"required": [
"labels"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"url input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"retryMessageContent": {
"type": "string"
}
},
"required": [
"labels",
"retryMessageContent"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"phone number input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"retryMessageContent": {
"type": "string"
},
"defaultCountryCode": {
"type": "string"
}
},
"required": [
"labels",
"retryMessageContent"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"date input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"labels": {
"type": "object",
"properties": {
"button": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"required": [
"button",
"from",
"to"
],
"additionalProperties": false
},
"hasTime": {
"type": "boolean"
},
"isRange": {
"type": "boolean"
},
"format": {
"type": "string"
},
"min": {
"type": "string"
},
"max": {
"type": "string"
}
},
"required": [
"labels",
"hasTime",
"isRange"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"payment input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"provider": {
"type": "string",
"enum": [
"Stripe"
]
},
"labels": {
"type": "object",
"properties": {
"button": {
"type": "string"
},
"success": {
"type": "string"
}
},
"required": [
"button"
],
"additionalProperties": false
},
"additionalInformation": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "string"
},
"phoneNumber": {
"type": "string"
},
"address": {
"type": "object",
"properties": {
"country": {
"type": "string"
},
"line1": {
"type": "string"
},
"line2": {
"type": "string"
},
"state": {
"type": "string"
},
"city": {
"type": "string"
},
"postalCode": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"credentialsId": {
"type": "string"
},
"currency": {
"type": "string"
},
"amount": {
"type": "string"
},
"retryMessageContent": {
"type": "string"
}
},
"required": [
"provider",
"labels",
"currency"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"rating input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"buttonType": {
"anyOf": [
{
"type": "string",
"enum": [
"Icons"
]
},
{
"type": "string",
"enum": [
"Numbers"
]
}
]
},
"length": {
"type": "number"
},
"labels": {
"type": "object",
"properties": {
"left": {
"type": "string"
},
"right": {
"type": "string"
},
"button": {
"type": "string"
}
},
"required": [
"button"
],
"additionalProperties": false
},
"customIcon": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"svg": {
"type": "string"
}
},
"required": [
"isEnabled"
],
"additionalProperties": false
},
"isOneClickSubmitEnabled": {
"type": "boolean"
}
},
"required": [
"buttonType",
"length",
"labels",
"customIcon"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"file input"
]
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isRequired": {
"type": "boolean"
},
"isMultipleAllowed": {
"type": "boolean"
},
"labels": {
"type": "object",
"properties": {
"placeholder": {
"type": "string"
},
"button": {
"type": "string"
},
"clear": {
"type": "string"
},
"skip": {
"type": "string"
}
},
"required": [
"placeholder",
"button"
],
"additionalProperties": false
},
"sizeLimit": {
"type": "number",
"description": "Deprecated"
}
},
"required": [
"isMultipleAllowed",
"labels"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"options"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"groupId": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"picture choice input"
]
},
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"blockId": {
"type": "string",
"description": "Deprecated"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "number",
"enum": [
3
]
},
"pictureSrc": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"displayCondition": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"condition": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"variableId": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with",
"Matches regex",
"Does not match regex"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"required": [
"id",
"type"
],
"additionalProperties": false
}
},
"options": {
"type": "object",
"properties": {
"variableId": {
"type": "string"
},
"isMultipleChoice": {
"type": "boolean"
},
"isSearchable": {
"type": "boolean"
},
"buttonLabel": {
"type": "string"
},
"searchInputPlaceholder": {
"type": "string"
},
"dynamicItems": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"titlesVariableId": {
"type": "string"
},
"descriptionsVariableId": {
"type": "string"
},
"pictureSrcsVariableId": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"buttonLabel",
"searchInputPlaceholder"
],
"additionalProperties": false
}
},
"required": [
"id",
"groupId",
"type",
"items",
"options"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"prefilledValue": {
"type": "string"
},
"runtimeOptions": {
"type": "object",
"properties": {
"paymentIntentSecret": {
"type": "string"
},
"amountLabel": {
"type": "string"
},
"publicKey": {
"type": "string"
}
},
"required": [
"paymentIntentSecret",
"amountLabel",
"publicKey"
],
"additionalProperties": false
}
}
}
]
},
"clientSideActions": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"properties": {
"lastBubbleBlockId": {
"type": "string"
},
"expectsDedicatedReply": {
"type": "boolean"
}
}
},
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "object",
"properties": {
"scriptToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
},
{
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
],
"nullable": true
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
},
"required": [
"scriptToExecute"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"redirect": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"isNewTab": {
"type": "boolean"
}
},
"required": [
"isNewTab"
],
"additionalProperties": false
}
},
"required": [
"redirect"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"chatwoot": {
"type": "object",
"properties": {
"scriptToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
},
{
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
],
"nullable": true
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
},
"required": [
"scriptToExecute"
],
"additionalProperties": false
}
},
"required": [
"chatwoot"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"googleAnalytics": {
"type": "object",
"properties": {
"trackingId": {
"type": "string"
},
"category": {
"type": "string"
},
"action": {
"type": "string"
},
"label": {
"type": "string"
},
"value": {
"anyOf": [
{
"type": "number"
},
{}
]
},
"sendTo": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"googleAnalytics"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"wait": {
"type": "object",
"properties": {
"secondsToWaitFor": {
"type": "number"
}
},
"required": [
"secondsToWaitFor"
],
"additionalProperties": false
}
},
"required": [
"wait"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"setVariable": {
"type": "object",
"properties": {
"scriptToExecute": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"value": {
"anyOf": [
{
"anyOf": [
{
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
{
"type": "boolean"
}
]
},
{
"type": "array",
"items": {
"type": "string",
"nullable": true
}
}
],
"nullable": true
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"content",
"args"
],
"additionalProperties": false
}
},
"required": [
"scriptToExecute"
],
"additionalProperties": false
}
},
"required": [
"setVariable"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"streamOpenAiChatCompletion": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"role": {
"type": "string",
"enum": [
"system",
"user",
"assistant"
]
}
},
"additionalProperties": false
}
},
"displayStream": {
"type": "boolean"
}
},
"required": [
"messages"
],
"additionalProperties": false
}
},
"required": [
"streamOpenAiChatCompletion"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"webhookToExecute": {
"type": "object",
"properties": {
"url": {
"type": "string"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"body": {},
"method": {
"type": "string",
"enum": [
"POST",
"GET",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"CONNECT",
"OPTIONS",
"TRACE"
]
}
},
"required": [
"url"
],
"additionalProperties": false
}
},
"required": [
"webhookToExecute"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"startPropsToInject": {
"type": "object",
"properties": {
"googleAnalyticsId": {
"type": "string"
},
"pixelId": {
"type": "string"
},
"gtmId": {
"type": "string"
},
"customHeadCode": {
"type": "string"
}
},
"additionalProperties": false
}
},
"required": [
"startPropsToInject"
],
"additionalProperties": false
}
]
},
{
"type": "object",
"properties": {
"pixel": {
"anyOf": [
{
"type": "object",
"properties": {
"pixelId": {
"type": "string"
},
"isInitSkip": {
"type": "boolean"
},
"params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"eventType": {
"not": {}
}
},
"additionalProperties": false
},
{
"type": "object",
"properties": {
"pixelId": {
"type": "string"
},
"isInitSkip": {
"type": "boolean"
},
"params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"eventType": {
"type": "string",
"enum": [
"Lead",
"Contact",
"CompleteRegistration",
"Schedule",
"SubmitApplication",
"ViewContent",
"AddPaymentInfo",
"AddToCart",
"AddToWishlist",
"CustomizeProduct",
"Donate",
"FindLocation",
"InitiateCheckout",
"Purchase",
"Search",
"StartTrial",
"Subscribe"
]
}
},
"required": [
"eventType"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"pixelId": {
"type": "string"
},
"isInitSkip": {
"type": "boolean"
},
"params": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"key": {
"type": "string"
},
"value": {}
},
"required": [
"id"
],
"additionalProperties": false
}
},
"eventType": {
"type": "string",
"enum": [
"Custom"
]
},
"name": {
"type": "string"
}
},
"required": [
"eventType"
],
"additionalProperties": false
}
]
}
},
"required": [
"pixel"
],
"additionalProperties": false
}
]
}
]
}
},
"sessionId": {
"type": "string"
},
"typebot": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"theme": {
"type": "object",
"properties": {
"general": {
"type": "object",
"properties": {
"font": {
"type": "string"
},
"background": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Color",
"Image",
"None"
]
},
"content": {
"type": "string"
}
},
"required": [
"type"
],
"additionalProperties": false
}
},
"required": [
"font",
"background"
],
"additionalProperties": false
},
"chat": {
"type": "object",
"properties": {
"hostAvatar": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"url": {
"type": "string"
}
},
"required": [
"isEnabled"
],
"additionalProperties": false
},
"guestAvatar": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"url": {
"type": "string"
}
},
"required": [
"isEnabled"
],
"additionalProperties": false
},
"hostBubbles": {
"type": "object",
"properties": {
"backgroundColor": {
"type": "string"
},
"color": {
"type": "string"
}
},
"required": [
"backgroundColor",
"color"
],
"additionalProperties": false
},
"guestBubbles": {
"type": "object",
"properties": {
"backgroundColor": {
"type": "string"
},
"color": {
"type": "string"
}
},
"required": [
"backgroundColor",
"color"
],
"additionalProperties": false
},
"buttons": {
"type": "object",
"properties": {
"backgroundColor": {
"type": "string"
},
"color": {
"type": "string"
}
},
"required": [
"backgroundColor",
"color"
],
"additionalProperties": false
},
"inputs": {
"type": "object",
"properties": {
"backgroundColor": {
"type": "string"
},
"color": {
"type": "string"
},
"placeholderColor": {
"type": "string"
}
},
"required": [
"backgroundColor",
"color",
"placeholderColor"
],
"additionalProperties": false
},
"roundness": {
"type": "string",
"enum": [
"none",
"medium",
"large"
]
}
},
"required": [
"hostBubbles",
"guestBubbles",
"buttons",
"inputs"
],
"additionalProperties": false
},
"customCss": {
"type": "string"
}
},
"required": [
"general",
"chat"
],
"additionalProperties": false
},
"settings": {
"type": "object",
"properties": {
"general": {
"type": "object",
"properties": {
"isBrandingEnabled": {
"type": "boolean"
},
"isTypingEmulationEnabled": {
"type": "boolean"
},
"isInputPrefillEnabled": {
"type": "boolean"
},
"isHideQueryParamsEnabled": {
"type": "boolean"
},
"isNewResultOnRefreshEnabled": {
"type": "boolean"
},
"rememberUser": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"storage": {
"type": "string",
"enum": [
"session",
"local"
]
}
},
"additionalProperties": false
}
},
"required": [
"isBrandingEnabled"
],
"additionalProperties": false
},
"typingEmulation": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean"
},
"speed": {
"type": "number"
},
"maxDelay": {
"type": "number"
}
},
"required": [
"enabled",
"speed",
"maxDelay"
],
"additionalProperties": false
},
"metadata": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"imageUrl": {
"type": "string"
},
"favIconUrl": {
"type": "string"
},
"customHeadCode": {
"type": "string"
},
"googleTagManagerId": {
"type": "string"
}
},
"additionalProperties": false
},
"whatsApp": {
"type": "object",
"properties": {
"isEnabled": {
"type": "boolean"
},
"startCondition": {
"type": "object",
"properties": {
"logicalOperator": {
"type": "string",
"enum": [
"OR",
"AND"
]
},
"comparisons": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"comparisonOperator": {
"type": "string",
"enum": [
"Equal to",
"Not equal",
"Contains",
"Does not contain",
"Greater than",
"Less than",
"Is set",
"Is empty",
"Starts with",
"Ends with",
"Matches regex",
"Does not match regex"
]
},
"value": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}
},
"required": [
"logicalOperator",
"comparisons"
],
"additionalProperties": false
},
"sessionExpiryTimeout": {
"type": "number",
"maximum": 48,
"minimum": 0.01,
"description": "Expiration delay in hours after latest interaction"
}
},
"additionalProperties": false
}
},
"required": [
"general",
"typingEmulation",
"metadata"
],
"additionalProperties": false
}
},
"required": [
"id",
"theme",
"settings"
],
"additionalProperties": false
},
"resultId": {
"type": "string"
},
"dynamicTheme": {
"type": "object",
"properties": {
"hostAvatarUrl": {
"type": "string"
},
"guestAvatarUrl": {
"type": "string"
}
},
"additionalProperties": false
},
"logs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"description": {
"type": "string"
},
"details": {}
},
"required": [
"status",
"description"
],
"additionalProperties": false
}
},
"lastMessageNewFormat": {
"type": "string",
"description": "The sent message is validated and formatted on the backend. This is set only if the message differs from the formatted version."
}
},
"required": [
"messages"
],
"additionalProperties": false
}
}
}
},
"default": {
"$ref": "#/components/responses/error"
}
}
}
},
"/typebots/{typebotId}/blocks/{blockId}/storage/upload-url": {
"get": {
"operationId": "getUploadUrl",
"summary": "Get upload URL for a file",
"description": "Used for the web client to get the bucket upload file.",
"parameters": [
{
"name": "typebotId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "blockId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "filePath",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "fileType",
"in": "query",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"presignedUrl": {
"type": "string"
},
"hasReachedStorageLimit": {
"type": "boolean"
}
},
"required": [
"presignedUrl",
"hasReachedStorageLimit"
],
"additionalProperties": false
}
}
}
},
"default": {
"$ref": "#/components/responses/error"
}
},
"deprecated": true
}
},
"/generate-upload-url": {
"post": {
"operationId": "generateUploadUrl",
"summary": "Generate upload URL",
"description": "Used to upload anything from the client to S3 bucket",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"filePathProps": {
"type": "object",
"properties": {
"typebotId": {
"type": "string"
},
"blockId": {
"type": "string"
},
"resultId": {
"type": "string"
},
"fileName": {
"type": "string"
}
},
"required": [
"typebotId",
"blockId",
"resultId",
"fileName"
],
"additionalProperties": false
},
"fileType": {
"type": "string"
}
},
"required": [
"filePathProps"
],
"additionalProperties": false
}
}
}
},
"parameters": [],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"presignedUrl": {
"type": "string"
},
"formData": {
"type": "object",
"additionalProperties": {}
},
"fileUrl": {
"type": "string"
}
},
"required": [
"presignedUrl",
"formData",
"fileUrl"
],
"additionalProperties": false
}
}
}
},
"default": {
"$ref": "#/components/responses/error"
}
}
}
},
"/sessions/{sessionId}/updateTypebot": {
"post": {
"operationId": "updateTypebotInSession",
"summary": "Update typebot in session",
"description": "Update chat session with latest typebot modifications. This is useful when you want to update the typebot in an ongoing session after making changes to it.",
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"name": "sessionId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"enum": [
"success"
]
}
},
"required": [
"message"
],
"additionalProperties": false
}
}
}
},
"default": {
"$ref": "#/components/responses/error"
}
}
}
},
"/workspaces/{workspaceId}/whatsapp/{credentialsId}/webhook": {
"get": {
"operationId": "whatsAppRouter-subscribeWebhook",
"summary": "Subscribe webhook",
"tags": [
"WhatsApp"
],
"security": [
{
"Authorization": []
}
],
"parameters": [
{
"name": "workspaceId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "credentialsId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "hub.challenge",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "hub.verify_token",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "number"
}
}
}
},
"default": {
"$ref": "#/components/responses/error"
}
}
},
"post": {
"operationId": "whatsAppRouter-receiveMessage",
"summary": "Message webhook",
"tags": [
"WhatsApp"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"entry": {
"type": "array",
"items": {
"type": "object",
"properties": {
"changes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"value": {
"type": "object",
"properties": {
"contacts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"profile": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"additionalProperties": false
}
},
"required": [
"profile"
],
"additionalProperties": false
}
},
"messages": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"from": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text"
]
},
"text": {
"type": "object",
"properties": {
"body": {
"type": "string"
}
},
"required": [
"body"
],
"additionalProperties": false
},
"timestamp": {
"type": "string"
}
},
"required": [
"from",
"type",
"text",
"timestamp"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"from": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"button"
]
},
"button": {
"type": "object",
"properties": {
"text": {
"type": "string"
},
"payload": {
"type": "string"
}
},
"required": [
"text",
"payload"
],
"additionalProperties": false
},
"timestamp": {
"type": "string"
}
},
"required": [
"from",
"type",
"button",
"timestamp"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"from": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"interactive"
]
},
"interactive": {
"type": "object",
"properties": {
"button_reply": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"title": {
"type": "string"
}
},
"required": [
"id",
"title"
],
"additionalProperties": false
}
},
"required": [
"button_reply"
],
"additionalProperties": false
},
"timestamp": {
"type": "string"
}
},
"required": [
"from",
"type",
"interactive",
"timestamp"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"from": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"image"
]
},
"image": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"timestamp": {
"type": "string"
}
},
"required": [
"from",
"type",
"image",
"timestamp"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"from": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"video"
]
},
"video": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"timestamp": {
"type": "string"
}
},
"required": [
"from",
"type",
"video",
"timestamp"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"from": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"audio"
]
},
"audio": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"timestamp": {
"type": "string"
}
},
"required": [
"from",
"type",
"audio",
"timestamp"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"from": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"document"
]
},
"document": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
},
"timestamp": {
"type": "string"
}
},
"required": [
"from",
"type",
"document",
"timestamp"
],
"additionalProperties": false
}
]
}
}
},
"additionalProperties": false
}
},
"required": [
"value"
],
"additionalProperties": false
}
}
},
"required": [
"changes"
],
"additionalProperties": false
}
}
},
"required": [
"entry"
],
"additionalProperties": false
}
}
}
},
"parameters": [
{
"name": "workspaceId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "credentialsId",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"additionalProperties": false
}
}
}
},
"default": {
"$ref": "#/components/responses/error"
}
}
}
}
},
"components": {
"securitySchemes": {
"Authorization": {
"type": "http",
"scheme": "bearer"
}
},
"responses": {
"error": {
"description": "Error response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string"
},
"code": {
"type": "string"
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
},
"required": [
"message"
],
"additionalProperties": false
}
}
},
"required": [
"message",
"code"
],
"additionalProperties": false
}
}
}
}
}
},
"externalDocs": {
"url": "https://docs.typebot.io/api"
}
}