{"openapi":"3.0.0","servers":[{"url":"https://webchat.botpress.cloud/"}],"info":{"title":"Webchat API","description":"API for the Webchat Integration","version":"0.0.0"},"paths":{"/conversations/{id}":{"get":{"operationId":"getConversation","description":"Retrieves the [Conversation](#schema_conversation) object for a valid identifier.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Conversation id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getConversationResponse"},"default":{"$ref":"#/components/responses/getConversationResponse"}}},"delete":{"operationId":"deleteConversation","description":"Permanently deletes a [Conversation](#schema_conversation). It cannot be undone. Also immediately deletes corresponding [Messages](#schema_message).","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Conversation id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/deleteConversationResponse"},"default":{"$ref":"#/components/responses/deleteConversationResponse"}}}},"/conversations":{"post":{"operationId":"createConversation","description":"Creates a new [Conversation](#schema_conversation)","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"$ref":"#/components/responses/createConversationResponse"},"default":{"$ref":"#/components/responses/createConversationResponse"}},"requestBody":{"$ref":"#/components/requestBodies/createConversationBody"}},"get":{"operationId":"listConversations","description":"Returns a list of [Conversation](#schema_conversation) objects","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"nextToken","in":"query","description":"Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/listConversationsResponse"},"default":{"$ref":"#/components/responses/listConversationsResponse"}}}},"/conversations/{id}/listen":{"get":{"operationId":"listenConversation","description":"Creates a SSE stream to receive messages and events from a conversation","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Conversation id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/listenConversationResponse"},"default":{"$ref":"#/components/responses/listenConversationResponse"}}}},"/conversations/{id}/messages":{"get":{"operationId":"listConversationMessages","description":"Retrieves the conversation's [Messages](#schema_message)","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"nextToken","in":"query","description":"Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results","required":false,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Conversation id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/listConversationMessagesResponse"},"default":{"$ref":"#/components/responses/listConversationMessagesResponse"}}}},"/conversations/{id}/participants":{"post":{"operationId":"addParticipant","description":"Add a [Participant](#schema_user) to a [Conversation](#schema_conversation).","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Conversation id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/addParticipantResponse"},"default":{"$ref":"#/components/responses/addParticipantResponse"}},"requestBody":{"$ref":"#/components/requestBodies/addParticipantBody"}},"get":{"operationId":"listParticipants","description":"Retrieves a list of [Participants](#schema_user) for a given [Conversation](#schema_conversation).","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"nextToken","in":"query","description":"Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results","required":false,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Conversation id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/listParticipantsResponse"},"default":{"$ref":"#/components/responses/listParticipantsResponse"}}}},"/conversations/{id}/participants/{userId}":{"delete":{"operationId":"removeParticipant","description":"Remove a [Participant](#schema_user) from a [Conversation](#schema_conversation).","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Conversation id","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","description":"User id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/removeParticipantResponse"},"default":{"$ref":"#/components/responses/removeParticipantResponse"}}},"get":{"operationId":"getParticipant","description":"Retrieves a [Participant](#schema_user) from a [Conversation](#schema_conversation).","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Conversation id","required":true,"schema":{"type":"string"}},{"name":"userId","in":"path","description":"User id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getParticipantResponse"},"default":{"$ref":"#/components/responses/getParticipantResponse"}}}},"/messages/{id}":{"get":{"operationId":"getMessage","description":"Retrieves the [Message](#schema_message) object for a valid identifier.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Id of the Message","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getMessageResponse"},"default":{"$ref":"#/components/responses/getMessageResponse"}}},"put":{"operationId":"updateMessage","description":"Updates a [Message](#schema_message). The bot won't be aware of the changes.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Message id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/updateMessageResponse"},"default":{"$ref":"#/components/responses/updateMessageResponse"}},"requestBody":{"$ref":"#/components/requestBodies/updateMessageBody"}},"delete":{"operationId":"deleteMessage","description":"Permanently deletes a [Message](#schema_message). It cannot be undone.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Message id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/deleteMessageResponse"},"default":{"$ref":"#/components/responses/deleteMessageResponse"}}}},"/messages":{"post":{"operationId":"createMessage","description":"Creates a new [Message](#schema_message)","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"$ref":"#/components/responses/createMessageResponse"},"default":{"$ref":"#/components/responses/createMessageResponse"}},"requestBody":{"$ref":"#/components/requestBodies/createMessageBody"}}},"/messages/{id}/select":{"put":{"operationId":"selectMessage","description":"Updates a [Message](#schema_message) sent by any user to mark it as already selected. A message can only be selected once.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Message id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/selectMessageResponse"},"default":{"$ref":"#/components/responses/selectMessageResponse"}},"requestBody":{"$ref":"#/components/requestBodies/selectMessageBody"}}},"/messages/{id}/feedback":{"put":{"operationId":"addMessageFeedback","description":"Adds feedback to a [Message](#schema_message).","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Message id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/addMessageFeedbackResponse"},"default":{"$ref":"#/components/responses/addMessageFeedbackResponse"}},"requestBody":{"$ref":"#/components/requestBodies/addMessageFeedbackBody"}},"delete":{"operationId":"removeMessageFeedback","description":"Removes feedback from a [Message](#schema_message).","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Message id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/removeMessageFeedbackResponse"},"default":{"$ref":"#/components/responses/removeMessageFeedbackResponse"}}}},"/users/me":{"get":{"operationId":"getUser","description":"Retrieves the [User](#schema_user) object for a valid identifier.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getUserResponse"},"default":{"$ref":"#/components/responses/getUserResponse"}}},"put":{"operationId":"updateUser","description":"Update [User](#schema_user)","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/updateUserResponse"},"default":{"$ref":"#/components/responses/updateUserResponse"}},"requestBody":{"$ref":"#/components/requestBodies/updateUserBody"}},"delete":{"operationId":"deleteUser","description":"Permanently deletes a [User](#schema_user). It cannot be undone.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/deleteUserResponse"},"default":{"$ref":"#/components/responses/deleteUserResponse"}}}},"/users":{"post":{"operationId":"createUser","description":"Creates a new [User](#schema_user)","parameters":[{"name":"x-admin-secret","in":"header","description":"Admin Key for managing users","required":false,"schema":{"type":"string"}}],"responses":{"201":{"$ref":"#/components/responses/createUserResponse"},"default":{"$ref":"#/components/responses/createUserResponse"}},"requestBody":{"$ref":"#/components/requestBodies/createUserBody"}}},"/users/key":{"post":{"operationId":"generateUserKey","description":"Generates a new user authentication key. Can only be called by an administrator and when an admin key is configured.","parameters":[{"name":"x-admin-secret","in":"header","description":"Admin Key for managing users","required":false,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/generateUserKeyResponse"},"default":{"$ref":"#/components/responses/generateUserKeyResponse"}},"requestBody":{"$ref":"#/components/requestBodies/generateUserKeyBody"}}},"/events/{id}":{"get":{"operationId":"getEvent","description":"Retrieves the [Event](#schema_event) object for a valid identifier.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","description":"Id of the Event","required":true,"schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/getEventResponse"},"default":{"$ref":"#/components/responses/getEventResponse"}}}},"/events":{"post":{"operationId":"createEvent","description":"Creates a new [Event](#schema_event)","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"$ref":"#/components/responses/createEventResponse"},"default":{"$ref":"#/components/responses/createEventResponse"}},"requestBody":{"$ref":"#/components/requestBodies/createEventBody"}}},"/files":{"post":{"operationId":"createFile","description":"Creates a new file and returns it's upload URL.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":true,"schema":{"type":"string"}}],"responses":{"201":{"$ref":"#/components/responses/createFileResponse"},"default":{"$ref":"#/components/responses/createFileResponse"}},"requestBody":{"$ref":"#/components/requestBodies/createFileBody"}}},"/initialize":{"get":{"operationId":"initializeConversation","description":"Creates a SSE stream to receive messages and events. The first event will be a payload containing the conversation details.","parameters":[{"name":"x-user-key","in":"header","description":"Authentication Key","required":false,"schema":{"type":"string"}},{"name":"x-admin-secret","in":"header","description":"Admin Key for managing users","required":false,"schema":{"type":"string"}},{"name":"userId","in":"query","description":"User id (if not provided with a user key a new user will be created)","required":false,"schema":{"type":"string"}},{"name":"conversationId","in":"query","description":"Conversation id","schema":{"type":"string"}}],"responses":{"200":{"$ref":"#/components/responses/initializeConversationResponse"},"default":{"$ref":"#/components/responses/initializeConversationResponse"}}}},"/p":{"post":{"operationId":"sendPerfMetrics","description":"Sends performance metrics to the server.","parameters":[],"responses":{"200":{"$ref":"#/components/responses/sendPerfMetricsResponse"},"default":{"$ref":"#/components/responses/sendPerfMetricsResponse"}},"requestBody":{"$ref":"#/components/requestBodies/sendPerfMetricsBody"}}}},"components":{"schemas":{"User":{"type":"object","properties":{"name":{"type":"string","description":"Name of the [User](#schema_user)"},"pictureUrl":{"type":"string","description":"Picture url of the [User](#schema_user)"},"data":{"type":"object","additionalProperties":{},"description":"User data"},"attributes":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom attributes of the user"},"id":{"type":"string","description":"Id of the [User](#schema_user)"},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the [User](#schema_user) in ISO 8601 format"},"updatedAt":{"type":"string","format":"date-time","description":"Updating date of the [User](#schema_user) in ISO 8601 format"}},"required":["id","createdAt","updatedAt"],"description":"The user object represents someone interacting with the bot within a specific integration. The same person interacting with a bot in slack and messenger will be represented with two different users.","additionalProperties":false},"Conversation":{"type":"object","properties":{"id":{"type":"string","description":"Id of the [Conversation](#schema_conversation)"},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the [Conversation](#schema_conversation) in ISO 8601 format"},"updatedAt":{"type":"string","format":"date-time","description":"Updating date of the [Conversation](#schema_conversation) in ISO 8601 format"},"lastMessage":{"type":"object","properties":{"id":{"type":"string","description":"Id of the [Message](#schema_message)"},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the [Message](#schema_message) in ISO 8601 format"},"payload":{"oneOf":[{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["audio"]}},"required":["audioUrl","type"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}},"type":{"type":"string","enum":["card"]}},"required":["title","actions","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}}},"required":["title","actions"]}},"type":{"type":"string","enum":["carousel"]}},"required":["items","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["choice"]}},"required":["text","options","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["dropdown"]}},"required":["text","options","type"]},{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["file"]}},"required":["fileUrl","type"]},{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["image"]}},"required":["imageUrl","type"]},{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["location"]}},"required":["latitude","longitude","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["text","type"]},{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["video"]}},"required":["videoUrl","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"payload":{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["text"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["markdown"]},"payload":{"type":"object","properties":{"markdown":{"type":"string","minLength":1}},"required":["markdown"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"payload":{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["imageUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["audio"]},"payload":{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["audioUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"payload":{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["videoUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"payload":{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["fileUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"payload":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"}},"required":["latitude","longitude"]}},"required":["type","payload"]}]}},"type":{"type":"string","enum":["bloc"]}},"required":["items","type"]},{"type":"object","properties":{"markdown":{"type":"string","minLength":1},"type":{"type":"string","enum":["markdown"]}},"required":["markdown","type"]},{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"},"data":{"nullable":true},"type":{"type":"string","enum":["custom"]}},"required":["url","name","type"]}],"description":"Payload is the content of the message."},"userId":{"type":"string","description":"ID of the [User](#schema_user)"},"conversationId":{"type":"string","description":"ID of the [Conversation](#schema_conversation)"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"description":"Metadata of the message"},"replyTo":{"type":"string","description":"ID of the message this message is replying to"},"selectedBy":{"type":"string","description":"ID of the user who selected this message. Undefined if not selected."},"feedback":{"type":"object","properties":{"value":{"type":"string","enum":["positive","negative"]},"comment":{"type":"string"}},"required":["value"],"description":"Feedback of the message","additionalProperties":false}},"required":["id","createdAt","payload","userId","conversationId"],"description":"The last [Message](#schema_message) sent in the [Conversation](#schema_conversation)","additionalProperties":false}},"required":["id","createdAt","updatedAt"],"additionalProperties":false},"Message":{"type":"object","properties":{"id":{"type":"string","description":"Id of the [Message](#schema_message)"},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the [Message](#schema_message) in ISO 8601 format"},"payload":{"oneOf":[{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["audio"]}},"required":["audioUrl","type"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}},"type":{"type":"string","enum":["card"]}},"required":["title","actions","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}}},"required":["title","actions"]}},"type":{"type":"string","enum":["carousel"]}},"required":["items","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["choice"]}},"required":["text","options","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["dropdown"]}},"required":["text","options","type"]},{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["file"]}},"required":["fileUrl","type"]},{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["image"]}},"required":["imageUrl","type"]},{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["location"]}},"required":["latitude","longitude","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["text","type"]},{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["video"]}},"required":["videoUrl","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"payload":{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["text"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["markdown"]},"payload":{"type":"object","properties":{"markdown":{"type":"string","minLength":1}},"required":["markdown"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"payload":{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["imageUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["audio"]},"payload":{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["audioUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"payload":{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["videoUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"payload":{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["fileUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"payload":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"}},"required":["latitude","longitude"]}},"required":["type","payload"]}]}},"type":{"type":"string","enum":["bloc"]}},"required":["items","type"]},{"type":"object","properties":{"markdown":{"type":"string","minLength":1},"type":{"type":"string","enum":["markdown"]}},"required":["markdown","type"]},{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"},"data":{"nullable":true},"type":{"type":"string","enum":["custom"]}},"required":["url","name","type"]}],"description":"Payload is the content of the message."},"userId":{"type":"string","description":"ID of the [User](#schema_user)"},"conversationId":{"type":"string","description":"ID of the [Conversation](#schema_conversation)"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"description":"Metadata of the message"},"replyTo":{"type":"string","description":"ID of the message this message is replying to"},"selectedBy":{"type":"string","description":"ID of the user who selected this message. Undefined if not selected."},"feedback":{"type":"object","properties":{"value":{"type":"string","enum":["positive","negative"]},"comment":{"type":"string"}},"required":["value"],"description":"Feedback of the message","additionalProperties":false}},"required":["id","createdAt","payload","userId","conversationId"],"description":"The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).","additionalProperties":false},"Event":{"type":"object","properties":{"id":{"type":"string","description":"ID of the [Event](#schema_event)."},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the [Event](#schema_event) in ISO 8601 format"},"payload":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"data":{"type":"object","additionalProperties":{}}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["conversation_started"]},"data":{"type":"object","additionalProperties":{"readOnly":true}}},"required":["type","data"]}],"description":"Payload is the content of the event."},"conversationId":{"type":"string","description":"ID of the [Conversation](#schema_conversation)."},"userId":{"type":"string","description":"ID of the [User](#schema_user)."}},"required":["id","createdAt","payload","conversationId","userId"],"additionalProperties":false},"File":{"type":"object","properties":{"id":{"type":"string"},"botId":{"type":"string"},"key":{"type":"string"},"size":{"type":"number","nullable":true},"contentType":{"type":"string"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"accessPolicies":{"type":"array","items":{"type":"string","enum":["integrations","public_content"]}},"index":{"type":"boolean"},"url":{"type":"string"},"status":{"type":"string","enum":["upload_pending","upload_failed","upload_completed","indexing_pending","indexing_failed","indexing_completed"]},"failedStatusReason":{"type":"string"},"uploadUrl":{"type":"string"}},"required":["id","botId","key","size","contentType","tags","createdAt","updatedAt","accessPolicies","index","url","status","uploadUrl"],"additionalProperties":false},"Perf":{"type":"object","properties":{"duration":{"type":"number"},"event":{"type":"string"},"properties":{"type":"object","additionalProperties":{"nullable":true}}},"required":["duration","event","properties"],"additionalProperties":false}},"responses":{"getConversationResponse":{"description":"Returns a [Conversation](#schema_conversation) object if a valid identifier was provided","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/Conversation"}},"required":["conversation"],"title":"getConversationResponse","additionalProperties":false}}}},"createConversationResponse":{"description":"Returns a [Conversation](#schema_conversation)","content":{"application/json":{"schema":{"type":"object","properties":{"conversation":{"$ref":"#/components/schemas/Conversation"}},"required":["conversation"],"title":"createConversationResponse","additionalProperties":false}}}},"deleteConversationResponse":{"description":"Returns the [Conversation](#schema_conversation) object that was deleted","content":{"application/json":{"schema":{"type":"object","title":"deleteConversationResponse","additionalProperties":false}}}},"listConversationsResponse":{"description":"Returns a list of [Conversation](#schema_conversation) objects","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Id of the [Conversation](#schema_conversation)"},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the [Conversation](#schema_conversation) in ISO 8601 format"},"updatedAt":{"type":"string","format":"date-time","description":"Updating date of the [Conversation](#schema_conversation) in ISO 8601 format"},"lastMessage":{"type":"object","properties":{"id":{"type":"string","description":"Id of the [Message](#schema_message)"},"createdAt":{"type":"string","format":"date-time","description":"Creation date of the [Message](#schema_message) in ISO 8601 format"},"payload":{"oneOf":[{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["audio"]}},"required":["audioUrl","type"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}},"type":{"type":"string","enum":["card"]}},"required":["title","actions","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}}},"required":["title","actions"]}},"type":{"type":"string","enum":["carousel"]}},"required":["items","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["choice"]}},"required":["text","options","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["dropdown"]}},"required":["text","options","type"]},{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["file"]}},"required":["fileUrl","type"]},{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["image"]}},"required":["imageUrl","type"]},{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["location"]}},"required":["latitude","longitude","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["text","type"]},{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["video"]}},"required":["videoUrl","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"payload":{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["text"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["markdown"]},"payload":{"type":"object","properties":{"markdown":{"type":"string","minLength":1}},"required":["markdown"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"payload":{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["imageUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["audio"]},"payload":{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["audioUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"payload":{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["videoUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"payload":{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["fileUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"payload":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"}},"required":["latitude","longitude"]}},"required":["type","payload"]}]}},"type":{"type":"string","enum":["bloc"]}},"required":["items","type"]},{"type":"object","properties":{"markdown":{"type":"string","minLength":1},"type":{"type":"string","enum":["markdown"]}},"required":["markdown","type"]},{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"},"data":{"nullable":true},"type":{"type":"string","enum":["custom"]}},"required":["url","name","type"]}],"description":"Payload is the content of the message."},"userId":{"type":"string","description":"ID of the [User](#schema_user)"},"conversationId":{"type":"string","description":"ID of the [Conversation](#schema_conversation)"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"description":"Metadata of the message"},"replyTo":{"type":"string","description":"ID of the message this message is replying to"},"selectedBy":{"type":"string","description":"ID of the user who selected this message. Undefined if not selected."},"feedback":{"type":"object","properties":{"value":{"type":"string","enum":["positive","negative"]},"comment":{"type":"string"}},"required":["value"],"description":"Feedback of the message"}},"required":["id","createdAt","payload","userId","conversationId"],"description":"The last [Message](#schema_message) sent in the [Conversation](#schema_conversation)"}},"required":["id","createdAt","updatedAt"]}},"meta":{"type":"object","properties":{"nextToken":{"type":"string","description":"The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."}},"additionalProperties":false}},"required":["conversations","meta"],"title":"listConversationsResponse","additionalProperties":false}}}},"listenConversationResponse":{"description":"Returns nothing but a stream","content":{"application/json":{"schema":{"type":"object","title":"listenConversationResponse","additionalProperties":false}}}},"listConversationMessagesResponse":{"description":"Returns a list of [Message](#schema_message) objects","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"meta":{"type":"object","properties":{"nextToken":{"type":"string","description":"The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."}},"additionalProperties":false}},"required":["messages","meta"],"title":"listConversationMessagesResponse","additionalProperties":false}}}},"addParticipantResponse":{"description":"Returns the [Participant](#schema_user) object","content":{"application/json":{"schema":{"type":"object","properties":{"participant":{"$ref":"#/components/schemas/User"}},"required":["participant"],"title":"addParticipantResponse","additionalProperties":false}}}},"removeParticipantResponse":{"description":"Returns an empty object","content":{"application/json":{"schema":{"type":"object","title":"removeParticipantResponse","additionalProperties":false}}}},"getParticipantResponse":{"description":"Returns the [Participant](#schema_user) object","content":{"application/json":{"schema":{"type":"object","properties":{"participant":{"$ref":"#/components/schemas/User"}},"required":["participant"],"title":"getParticipantResponse","additionalProperties":false}}}},"listParticipantsResponse":{"description":"Returns a list of [Participants](#schema_user) objects","content":{"application/json":{"schema":{"type":"object","properties":{"participants":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"meta":{"type":"object","properties":{"nextToken":{"type":"string","description":"The token to use to retrieve the next page of results, passed as a query string parameter (value should be URL-encoded) to this API endpoint."}},"additionalProperties":false}},"required":["participants","meta"],"title":"listParticipantsResponse","additionalProperties":false}}}},"getMessageResponse":{"description":"Returns a [Message](#schema_message) object if a valid identifier was provided","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"}},"required":["message"],"title":"getMessageResponse","additionalProperties":false}}}},"createMessageResponse":{"description":"Returns a [Message](#schema_message).","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"}},"required":["message"],"title":"createMessageResponse","additionalProperties":false}}}},"updateMessageResponse":{"description":"Returns a [Message](#schema_message).","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"$ref":"#/components/schemas/Message"}},"required":["message"],"title":"updateMessageResponse","additionalProperties":false}}}},"selectMessageResponse":{"description":"Empty object","content":{"application/json":{"schema":{"type":"object","title":"selectMessageResponse","additionalProperties":false}}}},"deleteMessageResponse":{"description":"Empty object","content":{"application/json":{"schema":{"type":"object","title":"deleteMessageResponse","additionalProperties":false}}}},"addMessageFeedbackResponse":{"description":"Empty object","content":{"application/json":{"schema":{"type":"object","title":"addMessageFeedbackResponse","additionalProperties":false}}}},"removeMessageFeedbackResponse":{"description":"Empty object","content":{"application/json":{"schema":{"type":"object","title":"removeMessageFeedbackResponse","additionalProperties":false}}}},"getUserResponse":{"description":"Returns a [User](#schema_user) object if a valid identifier was provided","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}},"required":["user"],"title":"getUserResponse","additionalProperties":false}}}},"createUserResponse":{"description":"Returns a [User](#schema_user)","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"key":{"type":"string"}},"required":["user","key"],"title":"createUserResponse","additionalProperties":false}}}},"generateUserKeyResponse":{"description":"Returns a user key","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"}},"required":["key"],"title":"generateUserKeyResponse","additionalProperties":false}}}},"updateUserResponse":{"description":"Returns a [User](#schema_user)","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"}},"required":["user"],"title":"updateUserResponse","additionalProperties":false}}}},"deleteUserResponse":{"description":"Returns the [User](#schema_user) object that was deleted","content":{"application/json":{"schema":{"type":"object","title":"deleteUserResponse","additionalProperties":false}}}},"getEventResponse":{"description":"Returns an [Event](#schema_event) object if a valid identifier was provided","content":{"application/json":{"schema":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/Event"}},"required":["event"],"title":"getEventResponse","additionalProperties":false}}}},"createEventResponse":{"description":"Returns a [Event](#schema_event).","content":{"application/json":{"schema":{"type":"object","properties":{"event":{"$ref":"#/components/schemas/Event"}},"required":["event"],"title":"createEventResponse","additionalProperties":false}}}},"createFileResponse":{"description":"Returns a file","content":{"application/json":{"schema":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/File"}},"required":["file"],"title":"createFileResponse","additionalProperties":false}}}},"initializeConversationResponse":{"description":"Returns nothing but a stream","content":{"application/json":{"schema":{"type":"object","title":"initializeConversationResponse","additionalProperties":false}}}},"sendPerfMetricsResponse":{"description":"Returns nothing","content":{"application/json":{"schema":{"type":"object","title":"sendPerfMetricsResponse","additionalProperties":false}}}}},"requestBodies":{"createConversationBody":{"description":"Conversation data","content":{"application/json":{"schema":{"type":"object","properties":{"_":{"type":"string"}},"description":"Conversation properties","title":"createConversationBody","additionalProperties":false}}}},"addParticipantBody":{"description":"Participant data","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","description":"User id"}},"required":["userId"],"title":"addParticipantBody","additionalProperties":false}}}},"createMessageBody":{"description":"Message data","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"oneOf":[{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["audio"]}},"required":["audioUrl","type"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}},"type":{"type":"string","enum":["card"]}},"required":["title","actions","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}}},"required":["title","actions"]}},"type":{"type":"string","enum":["carousel"]}},"required":["items","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["choice"]}},"required":["text","options","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["dropdown"]}},"required":["text","options","type"]},{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["file"]}},"required":["fileUrl","type"]},{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["image"]}},"required":["imageUrl","type"]},{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["location"]}},"required":["latitude","longitude","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["text","type"]},{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["video"]}},"required":["videoUrl","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"payload":{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["text"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["markdown"]},"payload":{"type":"object","properties":{"markdown":{"type":"string","minLength":1}},"required":["markdown"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"payload":{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["imageUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["audio"]},"payload":{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["audioUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"payload":{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["videoUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"payload":{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["fileUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"payload":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"}},"required":["latitude","longitude"]}},"required":["type","payload"]}]}},"type":{"type":"string","enum":["bloc"]}},"required":["items","type"]},{"type":"object","properties":{"markdown":{"type":"string","minLength":1},"type":{"type":"string","enum":["markdown"]}},"required":["markdown","type"]},{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"},"data":{"nullable":true},"type":{"type":"string","enum":["custom"]}},"required":["url","name","type"]}],"description":"Payload is the content of the message."},"conversationId":{"type":"string","description":"ID of the [Conversation](#schema_conversation)"},"metadata":{"type":"object","additionalProperties":{"nullable":true},"description":"Metadata of the message"},"replyTo":{"type":"string","description":"ID of the message this message is replying to"}},"required":["payload","conversationId"],"title":"createMessageBody","additionalProperties":false}}}},"updateMessageBody":{"description":"Message data","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"oneOf":[{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["audio"]}},"required":["audioUrl","type"]},{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}},"type":{"type":"string","enum":["card"]}},"required":["title","actions","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1},"subtitle":{"type":"string","minLength":1},"imageUrl":{"type":"string","minLength":1},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string","enum":["postback","url","say"]},"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["action","label","value"]}}},"required":["title","actions"]}},"type":{"type":"string","enum":["carousel"]}},"required":["items","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["choice"]}},"required":["text","options","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"options":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"value":{"type":"string","minLength":1}},"required":["label","value"]}},"disableFreeText":{"type":"boolean"},"type":{"type":"string","enum":["dropdown"]}},"required":["text","options","type"]},{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["file"]}},"required":["fileUrl","type"]},{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["image"]}},"required":["imageUrl","type"]},{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["location"]}},"required":["latitude","longitude","type"]},{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"},"type":{"type":"string","enum":["text"]}},"required":["text","type"]},{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1},"type":{"type":"string","enum":["video"]}},"required":["videoUrl","type"]},{"type":"object","properties":{"items":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"payload":{"type":"object","properties":{"text":{"type":"string","minLength":1},"value":{"type":"string"}},"required":["text"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["markdown"]},"payload":{"type":"object","properties":{"markdown":{"type":"string","minLength":1}},"required":["markdown"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"payload":{"type":"object","properties":{"imageUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["imageUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["audio"]},"payload":{"type":"object","properties":{"audioUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["audioUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"payload":{"type":"object","properties":{"videoUrl":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["videoUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["file"]},"payload":{"type":"object","properties":{"fileUrl":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"fileId":{"type":"string","minLength":1}},"required":["fileUrl"]}},"required":["type","payload"]},{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"payload":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"address":{"type":"string"},"title":{"type":"string"}},"required":["latitude","longitude"]}},"required":["type","payload"]}]}},"type":{"type":"string","enum":["bloc"]}},"required":["items","type"]},{"type":"object","properties":{"markdown":{"type":"string","minLength":1},"type":{"type":"string","enum":["markdown"]}},"required":["markdown","type"]},{"type":"object","properties":{"url":{"type":"string"},"name":{"type":"string"},"data":{"nullable":true},"type":{"type":"string","enum":["custom"]}},"required":["url","name","type"]}],"description":"Payload is the content of the message."},"metadata":{"type":"object","additionalProperties":{"nullable":true},"description":"Metadata of the message"}},"title":"updateMessageBody","additionalProperties":false}}}},"selectMessageBody":{"description":"Empty object","content":{"application/json":{"schema":{"type":"object","title":"selectMessageBody","additionalProperties":false}}}},"addMessageFeedbackBody":{"description":"Message data","content":{"application/json":{"schema":{"type":"object","properties":{"value":{"type":"string","enum":["positive","negative"]},"comment":{"type":"string"}},"required":["value"],"title":"addMessageFeedbackBody","additionalProperties":false}}}},"createUserBody":{"description":"User data","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the [User](#schema_user) (not a unique identifier)"},"pictureUrl":{"type":"string","description":"Picture url of the [User](#schema_user)"},"userData":{"oneOf":[{"type":"object","additionalProperties":{}},{"type":"string"}],"description":"User data. An object or a signed JWT token","additionalProperties":{}},"attributes":{"oneOf":[{"type":"object","additionalProperties":{"type":"string"}},{"type":"string"}],"description":"Custom attributes for the user as key-value pairs. Can be an object or a signed JWT token."}},"title":"createUserBody","additionalProperties":false}}}},"generateUserKeyBody":{"description":"User Key Data","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The ID of the user to generate a key for"},"expiresAt":{"type":"number","description":"The expiration date of the key in milliseconds since midnight, January 1, 1970 UTC. If not provided, the key will never expire."}},"required":["id"],"title":"generateUserKeyBody","additionalProperties":false}}}},"updateUserBody":{"description":"User data","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name of the [User](#schema_user) (not a unique identifier)"},"pictureUrl":{"type":"string","description":"Picture url of the [User](#schema_user)"},"userData":{"oneOf":[{"type":"object","additionalProperties":{}},{"type":"string"}],"nullable":true,"description":"User data. An object or a signed JWT token","additionalProperties":{}},"attributes":{"oneOf":[{"type":"object","additionalProperties":{"type":"string","nullable":true}},{"type":"string"}],"description":"Custom attributes for the user as key-value pairs. Can be an object or a signed JWT token. Set a key to null to delete it."}},"title":"updateUserBody","additionalProperties":false}}}},"createEventBody":{"description":"Event data","content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"data":{"type":"object","additionalProperties":{}}},"required":["type","data"]},{"type":"object","properties":{"type":{"type":"string","enum":["conversation_started"]},"data":{"type":"object","additionalProperties":{"readOnly":true}}},"required":["type","data"]}],"description":"Payload is the content type of the event."},"conversationId":{"type":"string","description":"ID of the [Conversation](#schema_conversation)"},"bindConversation":{"type":"boolean","description":"Whether to bind the event to the conversation. Defaults to true"},"bindUser":{"type":"boolean","description":"Whether to bind the event to the user. Defaults to true"}},"required":["payload","conversationId"],"title":"createEventBody","additionalProperties":false}}}},"createFileBody":{"description":"File data","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","description":"Unique key for the file. Must be unique across the bot (and the integration, when applicable)."},"size":{"type":"number","description":"File size in bytes. This will count against your File Storage quota. If the index parameter is set to true, this will also count against your Vector DB Storage quota."},"accessPolicies":{"type":"array","items":{"type":"string","enum":["integrations","public_content"]},"description":"File access policies. Add \"public_content\" to allow public access to the file content. Add \"integrations\" to allow read, search and list operations for any integration installed in the bot."},"index":{"type":"boolean","description":"Whether the file should be indexed. If true, the file content will be searchable in the Vector DB. This will count against your Vector DB Storage quota."},"contentType":{"type":"string","description":"File content type. If omitted, the content type will be inferred from the file extension (if any) specified in key. If a content type cannot be inferred, the default is \"application/octet-stream\"."},"tags":{"type":"object","additionalProperties":{"type":"string"},"description":"File tags. These are used for search and filtering operations."},"expiresAt":{"type":"string","format":"date-time","description":"The timestamp (in ISO 8601 format) when the file will be automatically deleted from the file API."}},"required":["key","size"],"title":"createFileBody","additionalProperties":false}}}},"sendPerfMetricsBody":{"description":"Performance metrics","content":{"application/json":{"schema":{"type":"object","properties":{"duration":{"type":"number"},"event":{"type":"string"},"properties":{"type":"object","additionalProperties":{"nullable":true}}},"required":["duration","event","properties"],"title":"sendPerfMetricsBody","additionalProperties":false}}}}},"parameters":{},"securitySchemes":{}},"tags":[]}