Robofy API
HomeChangelog
HomeChangelog
Visit Website
Sign In
Create an account
  1. Chat
  • Start Guide
    • Overview
    • Architecture
    • Authentication
    • Changelog
  • Robofy API
    • Chat
      • Generate Client Token (Handshake)
        POST
      • Send Message (Streaming)
        POST
      • Send Message (Non Streaming)
        POST
      • Send WhatsApp Message
        POST
    • Chatbot / Agent
      • List Agents
      • Create Agent
      • Retrieve Agent
      • Update Agent
      • Delete Agent
      • Delink Asset
      • List Linked Assets
      • Delete Widget Tab
    • Account
      • Retrieve Account Details
      • Update Account Details
      • Retrieve Account Limit
    • Prompt & Persona
      • Update System Prompt
      • Retrieve Agent Settings
      • Update Persona
      • Retrieve Persona
    • Inbox
      • List Sessions
      • List Session Messages
    • Project
      • Create Project
      • List Projects
      • Update Project
      • Retreive Project
    • Leads
      • List Leads
    • Content
      • Add Website
      • Get Crawl Status
      • Add Text Content
      • Add File
    • Stats
      • Stats
    • License
      • Create License
      • List License
      • Update License
      • Retrieve License
      • Delete License
      • Update License Limit
    • Partner
      • Onboard
    • Schemas
      • Account
      • AccountDetailDto
      • Address
      • AgentCredentialInsertResponseDto
      • AgentCredentialRequestDto
      • AgentCredentialResponseDto
      • AgentDataPoint
      • AgentLeadCapture
      • AgentLeadReportDto
      • AgentLinkageDto
      • AgentMcpServerDto
      • AgentMcpServerInsertResponseDto
      • AgentMcpServerRequestDto
      • AgentMcpServerUpdateRequestDto
      • AgentPromptVersionDto
      • AgentSessionListDto
      • AgentSessionListItemDto
      • AgentStatsDto
      • AgentThemeDto
      • AgentThemeListDto
      • AgentToolLinkageInsertResponseDto
      • AgentToolLinkageRequestDto
      • AgentWhatappIntrgrationResponse
      • AgentWhatsAppLinkageDto
      • Button
      • CarouselCard
      • CategoryStats
      • ChatBotDetailsDto
      • ChatBotDetailsRequest
      • ChatBotDetailsUpdateRequest
      • ChatbotAISettingsDto
      • ChatbotAISettingsRequest
      • ChatbotAdvanceSettingsDto
      • ChatbotAdvanceSettingsRequest
      • ChatbotAppearanceSettingsDto
      • ChatbotAppearanceSettingsRequest
      • ChatbotAssetDelinkDto
      • ChatbotAssetLinkageDataDto
      • ChatbotAssetLinkageDelinkRequest
      • ChatbotAssetLinkageDetailsDto
      • ChatbotAssetLinkageDto
      • ChatbotAssetLinkageRequest
      • ChatbotTextLinkageRequest
      • ClientData
      • CommonResponse
      • Component
      • Contact
      • ContactName
      • CrawlStatusDto
      • CrawlWebsiteRequest
      • CreateOrUpdateProjectRequest
      • CreatePhoneNumberRequest
      • CreateTemplateRequest
      • CreateWebhookConfigRequest
      • DeLinkWhatsAppRequest
      • Email
      • Error
      • ErrorResponse
      • Example
      • FailureStats
      • FailureStatsDataPoint
      • FormField
      • GoogleSheetDto
      • GoogleSheetIntegrationRequest
      • InboxChatDto
      • InboxDto
      • InboxMessage
      • InboxSession
      • IntelligentMetricsDto
      • Interactive
      • InteractiveAction
      • InteractiveBody
      • InteractiveButton
      • InteractiveFooter
      • InteractiveHeader
      • InteractiveMedia
      • InteractiveProductItem
      • InteractiveProductSection
      • InteractiveReply
      • InteractiveRow
      • InteractiveSection
      • LeadCaptureForm
      • LeadData
      • LeadDataField
      • LeadFormData
      • LeadReport
      • LicenseCreateRequest
      • LicenseDto
      • LicenseLimitRequest
      • LicenseUpdateRequest
      • LimitedTimeOffer
      • LinkWhatsAppRequest
      • LinkedCredentialDto
      • LinkedMcpServerDto
      • Location
      • Media
      • MessageMetaData
      • MessageRequest
      • MessageResponse
      • MessageStats
      • MessageStatsDataPoint
      • MessageTemplate
      • NamedParameter
      • OrgLimitDto
      • Organization
      • PaginatedWebhookLogsResponse
      • Part
      • PartnerClientSession
      • PartnerClientSessionDto
      • Phone
      • PhoneNumberRequest
      • PhoneVerifyCodeRequest
      • PhoneVerifyRequest
      • PlatformStats
      • ProjectDetailDto
      • ProjectWABADetail
      • Reaction
      • ReadTypingIndicatorRequest
      • RecentInsightDto
      • Response
      • SessionInsightItemDto
      • SessionInsightsDto
      • SessionMetaDto
      • SessionMetricsDto
      • SessionSummaryDetailDto
      • StartUrl
      • SubcribedAppsRequest
      • SupportedApp
      • TemplateAction
      • TemplateButtons
      • TemplateCarousel
      • TemplateComponent
      • TemplateCurrency
      • TemplateDateTime
      • TemplateLimitedTimeOffer
      • TemplateMedia
      • TemplateParameter
      • TemplateProductItem
      • TemplateSection
      • TemplateTapTargetConfiguration
      • Text
      • ThemeMetaDto
      • TypingIndicator
      • UpdateOnboardStatusRequest
      • UpdateOnboardStatusResponseDto
      • UploadMedia
      • Url
      • WABADetail
      • WABADto
      • Webhook
      • WebhookConfigDto
      • WebhookConfiguration
      • WebhookLogDto
      • WebsiteDto
      • WhatsAppBusinessApiData
      • WhatsAppBusinessProfile
      • WidgetIntegration
  1. Chat

Generate Client Token (Handshake)

POST
/v1/widget/handshake
Initializes the Robofy widget and returns the widget configuration, available chatbot agents, and an authorization token for further widget communication.

Endpoint#

Request Body#

{
  "chatbot_id": "UOmfsaU...",
  "project_id": "24..",
  "version": 2
}

Request Parameters#

FieldTypeRequiredDescription
chatbot_idstringYesPublic chatbot identifier used to load the correct agent.
project_idstringYesProject identifier linked with the widget.
versionnumberYesWidget version. Use 2 for the current widget.

Success Response#

{
  "message": "Widget handshake completed successfully",
  "data": {
    "token": "JWT_TOKEN",
    "chatbots": [
      {
        "chatbot_id": "UOmfsaU_vRhAfIwDFrFLoXZUz9nHBAkDNkDygeBCjw",
        "agent_name": "Gujarat - Kitchenware - 49586759",
        "agent_type": "Public",
        "description": "Answers customer questions, troubleshoots issues, and reduces support ticket volume.",
        "avatar_image_path": "https://d2gnxsx8m1azoo.cloudfront.net/avatars/general/6.jpg",
        "greeting": "How can I assist you today?",
        "sort_order": 0,
        "quick_questions": [],
        "lead_capture": {
          "form_title": null,
          "form_subtitle": null,
          "submit_button_text": null
        }
      }
    ],
    "widget": {
      "header": {
        "title": "Hello there 👋",
        "subtitle": "How can I help you today?",
        "chat_tab_label": "Chat",
        "input_placeholder": "Type message here..",
        "download_transcript_label": "Download Transcript",
        "end_session_label": "End Chat Session"
      },
      "branding": {
        "theme_mode": 0,
        "theme_color": "#2563EB",
        "show_powered_by": true,
        "widget_position": "bottom-right",
        "widget_bubble_icon": "https://app-reseller.s3.us-west-2.amazonaws.com/defaulticon/default-icon-2.svg",
        "brand_name": "Robofy"
      },
      "behaviour": {
        "open_on_page_load": false,
        "show_on_mobile": true,
        "show_microphone": true,
        "close_after_time": 60,
        "enable_sources": true,
        "enable_suggested_questions": true
      },
      "loader": {
        "loader_texts": [
          "Understanding Query",
          "Analyzing",
          "Thinking",
          "Collecting Data",
          "Generating Response"
        ],
        "enable_loader": true
      },
      "reset_modal": {
        "reset_chat_modal_title": "Reset Chat",
        "reset_chat_modal_description": "This will permanently remove this conversation, including messages and any chat context stored for this session.",
        "confirm_reset_chat_button_text": "Yes, reset",
        "cancel_reset_chat_button_text": "Cancel",
        "enable_reset_chat_modal": true
      },
      "privacy": {
        "enable_chat_rating": false,
        "capture_ip_address": false,
        "chatbot_privacy_term": null
      },
      "custom_css": null,
      "custom_js": null
    }
  }
}

Response Fields#

Root#

FieldTypeDescription
messagestringStatus message for the handshake request.
dataobjectContains token, chatbot list, and widget configuration.

data#

FieldTypeDescription
tokenstringJWT token returned after successful handshake. Use this token for authorized widget requests.
chatbotsarrayList of chatbot agents available for the widget.
widgetobjectWidget UI, branding, behaviour, loader, reset, privacy, and custom script settings.

chatbots[]#

FieldTypeDescription
chatbot_idstringChatbot identifier.
agent_namestringDisplay name of the agent.
agent_typestringAgent visibility type. Example: Public.
descriptionstringShort description of the agent.
avatar_image_pathstringAgent avatar image URL.
greetingstringInitial greeting shown to the user.
sort_ordernumberDisplay order of the agent.
quick_questionsarraySuggested questions shown to the user.
lead_captureobjectLead capture form configuration.

widget.header#

FieldTypeDescription
titlestringWidget header title.
subtitlestringWidget header subtitle.
chat_tab_labelstringLabel for the chat tab.
input_placeholderstringPlaceholder text inside the message input.
download_transcript_labelstringLabel for transcript download action.
end_session_labelstringLabel for ending the chat session.

widget.branding#

FieldTypeDescription
theme_modenumberWidget theme mode.
theme_colorstringPrimary widget color in HEX format.
show_powered_bybooleanShows or hides powered-by branding.
widget_positionstringWidget position on the website. Example: bottom-right.
widget_bubble_iconstringWidget launcher icon URL.
brand_namestringBrand name shown in the widget.

widget.behaviour#

FieldTypeDescription
open_on_page_loadbooleanOpens the widget automatically on page load.
show_on_mobilebooleanShows or hides the widget on mobile devices.
show_microphonebooleanShows or hides microphone input.
close_after_timenumberAuto-close time in seconds.
enable_sourcesbooleanEnables source display in responses.
enable_suggested_questionsbooleanEnables suggested questions.

widget.loader#

FieldTypeDescription
loader_textsarrayList of loading messages shown while generating a response.
enable_loaderbooleanEnables or disables loader messages.

widget.reset_modal#

FieldTypeDescription
reset_chat_modal_titlestringReset modal title.
reset_chat_modal_descriptionstringReset modal description.
confirm_reset_chat_button_textstringConfirm button text.
cancel_reset_chat_button_textstringCancel button text.
enable_reset_chat_modalbooleanEnables or disables the reset confirmation modal.

widget.privacy#

FieldTypeDescription
enable_chat_ratingbooleanEnables or disables chat rating.
capture_ip_addressbooleanEnables or disables IP address capture.
chatbot_privacy_termstringnull

widget.custom_css#

TypeDescription
stringnull

widget.custom_js#

TypeDescription
stringnull

Notes#

Call this API before rendering the widget.
Store the returned token securely in the widget runtime.
Use the returned widget object to configure the widget UI and behaviour.
Use the returned chatbots array to display available agents.

Request

Body Params application/jsonRequired

Examples

Responses

🟢200Success
application/json
Bodyapplication/json

Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://agents.robofy.ai/v1/widget/handshake' \
--header 'Content-Type: application/json' \
--data '{
    "chatbot_id": "string",
    "project_id": "string",
    "version": 2
}'
Response Response Example
{}
Modified at 2026-05-04 09:10:57
Previous
Changelog
Next
Send Message (Streaming)
Built with