API ReferenceChat Widgets
Create chat widget
Create a new chat widget for an organization.
Authorization
sessionAuth AuthorizationBearer <token>
NextAuth session token
In: header
Path Parameters
orgId*string
Format
uuidRequest Body
application/json
assistantId*string
Format
uuidname*string
allowedDomains?array<>
Default
[]position?string
Default
"bottom-right"Value in
"bottom-left" | "bottom-right" | "top-left" | "top-right"primaryColor?string
Default
"#6366f1"textColor?string
Default
"#ffffff"welcomeMessage?string
Default
"Hi! How can I help you today?"enableTextChat?boolean
Default
trueenableVoiceCall?boolean
Default
trueResponse Body
application/json
curl -X POST "https://platform.autophone.org/api/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/widgets" \ -H "Content-Type: application/json" \ -d '{ "assistantId": "550e8400-e29b-41d4-a716-446655440000", "name": "Support Widget", "allowedDomains": [ "example.com", "www.example.com" ], "position": "bottom-right" }'{
"widget": {
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"assistantId": "bb8c7fe3-2157-48a3-a0a7-af503b091988",
"name": "string",
"allowedDomains": [],
"position": "bottom-left",
"primaryColor": "#6366f1",
"textColor": "#ffffff",
"welcomeMessage": "Hi! How can I help you today?",
"enableTextChat": true,
"enableVoiceCall": true,
"status": "active",
"createdAt": "2019-08-24T14:15:22Z"
}
}Empty
Empty
Empty