### Create Assistant API Request Example (cURL) Source: https://docs.assistable.ai/introduction/api-reference/create-assistant Code example demonstrating how to send a POST request to the /v2/create-assistant endpoint using cURL, including the necessary headers and JSON payload. ```cURL curl --request POST \ --url https://api.assistable.ai/v2/create-assistant \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "name": "", "description": "", "location_id": "", "ambient_noise": "", "prompt": "", "temperature": 123, "model": "gpt-4", "queue": 123, "knowledge_id": "", "voice_id": "" }' ``` -------------------------------- ### Get Assistant API Endpoint Documentation Source: https://docs.assistable.ai/introduction/api-reference/get-assistant Comprehensive documentation for the GET /v2/get-assistant endpoint, detailing its purpose, required authorization, query parameters, and successful response. ```APIDOC Endpoint: GET /v2/get-assistant Authorizations: Authorization: Type: string Location: header Required: true Description: Bearer authentication header of the form `Bearer `, where `` is your auth token. Query Parameters: assistant_id: Type: string Required: true Description: ID of the assistant to retrieve Response: 200: Assistant details retrieved successfully ``` -------------------------------- ### Retrieve Assistant Details using cURL Source: https://docs.assistable.ai/introduction/api-reference/get-assistant Example cURL command to make a GET request to the /v2/get-assistant endpoint, demonstrating how to include the authorization header. ```cURL curl --request GET \ --url https://api.assistable.ai/v2/get-assistant \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Example Response for Create Assistant Source: https://docs.assistable.ai/introduction/api-reference/create-assistant A sample JSON response indicating the successful creation of an assistant, including its status and unique identifier. ```JSON { "status": 123, "data": { "status": "", "id": "" } } ``` -------------------------------- ### cURL Example for Update Assistant API Request Source: https://docs.assistable.ai/introduction/api-reference/update-assistant Example cURL command to send a PUT request to the Assistable.ai Update Assistant API, demonstrating the required headers and JSON request body for updating an assistant. ```cURL curl --request PUT \ --url https://api.assistable.ai/v2/update-assistant \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "name": "", "assistant_id": "", "location_id": "", "ambient_noise": "", "prompt": "", "temperature": 123, "model": "gpt-4", "queue": 123, "knowledge_id": "", "voice_id": "" }' ``` -------------------------------- ### JSON Response Example for Update Assistant API Source: https://docs.assistable.ai/introduction/api-reference/update-assistant Example JSON response body returned upon a successful update operation for an assistant, showing the status and data fields with their respective types. ```JSON { "status": 123, "data": { "status": "", "id": "" } } ``` -------------------------------- ### Get Messages API Success Response Example Source: https://docs.assistable.ai/introduction/api-reference/get-messages An example of the JSON structure returned upon a successful retrieval of conversation messages from the /v2/get-conversation endpoint. ```JSON { "messages": [ {} ], "channel": "" } ``` -------------------------------- ### JSON Response Example: Archive Assistant Source: https://docs.assistable.ai/introduction/api-reference/archive-assistant An example of the JSON payload returned by the API upon successful archiving of an assistant. ```JSON { "status": 123, "data": { "status": "", "id": "" } } ``` -------------------------------- ### cURL Example: Make AI Call (GHL-Safe) Request Source: https://docs.assistable.ai/introduction/api-reference/make-ai-call-ghl-safe An example cURL command demonstrating how to send a POST request to the /v2/ghl/make-call endpoint, including the necessary authorization header and JSON payload for initiating an AI call. ```cURL curl --request POST \ --url https://api.assistable.ai/v2/ghl/make-call \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "number_pool_id": "", "assistant_id": "", "location_id": "", "contact_id": "" }' ``` -------------------------------- ### Implementing AI Web Calling with Orbs/Widgets Source: https://docs.assistable.ai/introduction/quickstart Details the setup and usage of web calling via widgets (orbs) for browser-based AI conversations, including widget creation, code embedding on a website, and how contact information is managed through cookies. ```APIDOC Prerequisite: - Make sure to have a widget attached to the assistant you want to talk with in your browser. Steps: 1. To use the orbs / widgets to make AI calls in your browser, create a widget in the widget tab and connect your assistant. 2. Copy the code snippet from the orb and place it on your website. 3. Simply click the orb inside of your browser where you placed it on your website and converse with the assistant. 4. A Guest CallerID will be created the first time an orb is used, and consequent uses will remember the information from the contact in GoHighLevel using the cookies we placed in the user’s browser. Result: The contact that made the call will receive the conversation, as well as a call briefing, added to the contact post-call finish. ``` -------------------------------- ### Retrieve Conversation Messages with cURL Source: https://docs.assistable.ai/introduction/api-reference/get-messages Example cURL command to make a GET request to the /v2/get-conversation endpoint, demonstrating how to include the Authorization header. ```cURL curl --request GET \ --url https://api.assistable.ai/v2/get-conversation \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Create Message API Success Response Example Source: https://docs.assistable.ai/introduction/api-reference/create-message An example of the JSON response returned upon successful creation of a message (HTTP 201). This snippet illustrates the structure of the response, including a status code and data object with status and ID fields. ```json { "status": 123, "data": { "status": "", "id": "" } } ``` -------------------------------- ### Create Message API Request Example (cURL) Source: https://docs.assistable.ai/introduction/api-reference/create-message Example of a cURL command to send a POST request to the /v2/create-message endpoint. This includes the required Authorization header and the JSON request body with parameters such as location_id, content, and conversation_id. ```curl curl --request POST \ --url https://api.assistable.ai/v2/create-message \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "location_id": "", "content": "", "ai": true, "role": "user", "conversation_id": "", "message_id": "", "channel": "" }' ``` -------------------------------- ### cURL Example: Archive Assistant Source: https://docs.assistable.ai/introduction/api-reference/archive-assistant A practical cURL command demonstrating how to make a DELETE request to archive an assistant, including the required authorization. ```cURL curl --request DELETE \ --url https://api.assistable.ai/v2/delete-assistant \ --header 'Authorization: Bearer ' ``` -------------------------------- ### Agent Chat Completion (GHL-Safe) API Request Example Source: https://docs.assistable.ai/introduction/api-reference/agent-chat-completion-ghl-safe This cURL command demonstrates how to make a POST request to the /v2/ghl-chat-completion endpoint. It requires an Authorization header with a Bearer token and a JSON body containing conversation, contact, message, channel, input, location, messages, and assistant IDs. ```cURL curl --request POST \ --url https://api.assistable.ai/v2/ghl-chat-completion \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "conversation_id": "", "contact_id": "", "last_message_id": "", "channel": "", "input": "", "location_id": "", "messages": [ {} ], "assistant_id": "" }' ``` -------------------------------- ### Get Messages API Endpoint Definition Source: https://docs.assistable.ai/introduction/api-reference/get-messages Defines the Assistable.ai API endpoint for retrieving conversation messages, including the HTTP method, path, required authorization, query parameters, and the structure of the successful JSON response. ```APIDOC GET /v2/get-conversation Authorizations: Authorization: type: string in: header required: true description: Bearer authentication header of the form `Bearer `, where `` is your auth token. Query Parameters: location_id: type: string required: true description: Location ID conversation_id: type: string required: true description: ID of the conversation to retrieve Response (200 - application/json): description: Conversation details retrieved successfully type: object schema: messages: type: array items: {} channel: type: string ``` -------------------------------- ### Create Flow API Request using cURL Source: https://docs.assistable.ai/introduction/api-reference/create-flow Example cURL command to send a POST request to the /v2/create-flow endpoint, including necessary headers for authorization and content type, and a JSON body with the location ID. ```curl curl --request POST \ --url https://api.assistable.ai/v2/create-flow \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "location_id": "" }' ``` -------------------------------- ### Successful Create Flow API Response Body Source: https://docs.assistable.ai/introduction/api-reference/create-flow Example JSON response body returned upon successful creation of a new flow, indicating a status code and the ID of the newly created flow. ```json { "status": 123, "data": { "status": "", "id": "" } } ``` -------------------------------- ### APIDOC: Platform Tool Type Source: https://docs.assistable.ai/introduction/chat-ai Describes pre-built GoHighLevel tools for contact updates, calendar management, and task creation, requiring minimal input. ```APIDOC Platform: Description: Pre-built and pre-configured tools within GoHighLevel. Capabilities: Updating contact information, full calendar management, creating tasks. ``` -------------------------------- ### API Reference: POST /v2/create-assistant Endpoint Source: https://docs.assistable.ai/introduction/api-reference/create-assistant Comprehensive documentation for the Assistable.ai API endpoint to create a new assistant, detailing the HTTP method, endpoint path, authorization requirements, request body parameters, and the structure of a successful response. ```APIDOC Method: POST Endpoint: /v2/create-assistant Authorization: Type: Bearer Location: Header Parameter: Authorization Format: Bearer Description: Your authentication token. Request Body (application/json): name: string description: string location_id: string ambient_noise: string prompt: string temperature: number model: string (example: "gpt-4") queue: number knowledge_id: string voice_id: string Response (201 OK - application/json): Description: Assistant created successfully Schema: status: number data: object status: string id: string ``` -------------------------------- ### APIDOC: Autopilot Setting - AI Model Selection Source: https://docs.assistable.ai/introduction/chat-ai Allows selection between different OpenAI and Claude models for the assistant, noting their conversational and thoroughness characteristics. ```APIDOC AI Model: Type: Dropdown selection Options: OpenAI models, Claude models Characteristics: - OpenAI: Better conversationally, tool calling - Claude: More long-winded, thorough ``` -------------------------------- ### Handling AI Inbound Calls with GoHighLevel Source: https://docs.assistable.ai/introduction/quickstart Explains how to accept inbound AI calls, detailing how contact information is handled for existing and new contacts within GoHighLevel, and the post-call logging of conversations and briefings. ```APIDOC Prerequisite: - Make sure to have a phone number attached to the assistant you want to make a call from. Steps: 1. To accept an inbound call, just call your phone number after it has been attached to an assistant. 2. If your number already exists inside of GoHighLevel, available contact information will be pulled. 3. If your number does not exist inside of GoHighLevel, a Guest CallerID will be created inside of your sub-account. Result: The contact that made the call will receive the conversation, as well as a call briefing, added to the contact post-call finish. ``` -------------------------------- ### Initiating AI Outbound Calls via GoHighLevel Workflows Source: https://docs.assistable.ai/introduction/quickstart Describes the process of setting up and making outbound AI calls through GoHighLevel workflows, including attaching a phone number to the assistant and using assistant IDs and variables for call initiation. ```APIDOC Prerequisite: - Make sure to have a phone number attached to the assistant you want to make a call from. Steps: 1. To make an outbound call, navigate to your GoHighLevel workflows in the automation tab. 2. Open an existing workflow or create a new one where you would like to make a call. 3. Click on the ‘Plus’ icon in the workflow to open up the workflow actions. 4. Scroll to the bottom and select 'Make AI Call' action. 5. Add your assistant ID (found in the top left of the assistant configuration under the name). 6. Optionally add custom variables (all contact information is pre-filled). 7. Run a contact through the workflow. Result: The contact will automatically be called from the inputted assistant ID. The conversation and a call briefing will be added to the contact post-call finish. ``` -------------------------------- ### APIDOC: GoHighLevel Calendar Syncing and Verification Source: https://docs.assistable.ai/introduction/chat-ai Describes the process of syncing GoHighLevel calendars, refreshing connections, and the required verification step involving checking availability and booking a fake appointment to ensure validity for booking. ```APIDOC Calendars: Syncing: Backend automated. Refresh: 'Sync Calendar' button. Verification: Purpose: Ensure active and valid GoHighLevel calendars. Process: Upon 'Add to assistant', popup checks 7-day availability and books a fake appointment. ``` -------------------------------- ### Configuring and Using Active Tags for AI Chat Source: https://docs.assistable.ai/introduction/quickstart Explains how Active Tags enable AI assistant responses in chat channels without workflows, API calls, or webhooks. Details the process of creating, linking, and using active tags within GoHighLevel for text and chat conversations. ```APIDOC Configuration Steps: 1. Navigate to the Active Tags tab. 2. Create an active tag. 3. Connect an assistant to the active tag. 4. Create the actual tag to link to the assistant. 5. Save the changes. (The tag will automatically be added to GoHighLevel if connected.) Usage Steps: 1. Navigate to the contact you want to converse with and add your active tag. 2. When an inbound message comes from that contact (e.g., GoHighLevel number, chat widget, social media account), the system will: - See your active tag. - Match it to the corresponding assistant. - Generate and send the response. ``` -------------------------------- ### API Reference: Create Flow Endpoint Source: https://docs.assistable.ai/introduction/api-reference/create-flow Detailed API documentation for the POST /v2/create-flow endpoint, outlining its purpose, authorization requirements, request body structure, and expected successful response. ```APIDOC # Create Flow Creates a new flow for the specified location ## Endpoint POST /v2/create-flow ## Authorizations ### Authorization - **Type**: string - **Location**: header - **Required**: true - **Description**: Bearer authentication header of the form `Bearer `, where `` is your auth token. ## Request Body - **Content-Type**: application/json - **Parameters**: - `location_id`: (required) ## Response (201 - Flow created successfully) - **Content-Type**: application/json - **Body Structure**: ```json { "status": 123, "data": { "status": "", "id": "" } } ``` ``` -------------------------------- ### APIDOC: Custom Tool Type (API Wrapper) Source: https://docs.assistable.ai/introduction/chat-ai Describes a custom tool acting as an API wrapper to connect the assistant to any external system that has an API endpoint, storing API call returns as AI memory for contextual awareness. ```APIDOC Custom: Description: API wrapper for connecting to external systems with API endpoints. Functionality: Returns from API calls are stored as AI memory for contextual awareness. ``` -------------------------------- ### APIDOC: AI Find & Replace Feature Source: https://docs.assistable.ai/introduction/chat-ai Allows swapping out AI verbiage to prefer more casual language, addressing the issue of AI sounding too robotic. Useful for verbiage swapping, variables, and phrase filtering. ```APIDOC Find & Replace: Overview: Swaps AI verbiage for preferred phrasing. Example: Replace "Excellent!" with "Cool." Use Cases: - Verbiage swapping - Variables - Phrase filtering ``` -------------------------------- ### APIDOC: Extraction Tool Type Source: https://docs.assistable.ai/introduction/chat-ai Explains tools for extracting conversation information to populate custom fields in GoHighLevel. ```APIDOC Extraction: Description: Extracts information from conversations. Purpose: Fills custom fields in GoHighLevel. ``` -------------------------------- ### Create Message API Endpoint Specification Source: https://docs.assistable.ai/introduction/api-reference/create-message Detailed API documentation for the POST /v2/create-message endpoint. This includes specifications for authorization, the structure and parameters of the request body, and the expected format of a successful 201 response. ```APIDOC Endpoint: POST /v2/create-message Authorizations: Authorization: Type: string Location: header Required: true Description: Bearer authentication header of the form `Bearer `, where `` is your auth token. Request Body (application/json): location_id: string content: string ai: boolean (default: true) role: string (example: "user") conversation_id: string message_id: string channel: string Response (201 - application/json): Description: Message created successfully Type: object Structure: status: number (example: 123) data: status: string id: string ``` -------------------------------- ### APIDOC: Autopilot Setting - AI Response Temperature Source: https://docs.assistable.ai/introduction/chat-ai Controls the AI's determinism (0.00) versus conversational nature (1.00+). Lower temperatures are for deterministic use cases like appointment booking, while higher temperatures lead to more conversational but potentially less accurate AI. ```APIDOC Temperature: Type: Float (0.00 - 1.00+) Purpose: Controls AI determinism vs. conversational style. Ranges: - 0.00 - 0.50: More deterministic (e.g., appointment booking) - 0.50 - 1.00+: More conversational, potential for decreased tool call quality/hallucination. ``` -------------------------------- ### APIDOC: Add Tag Tool Type Source: https://docs.assistable.ai/introduction/chat-ai Details adding a tag to a GoHighLevel contact based on specified conditions. ```APIDOC Add Tag: Description: Adds a tag to a contact in GoHighLevel. Condition: Based on outlined description. ``` -------------------------------- ### APIDOC: Autopilot Setting - AI Response Wait Time Source: https://docs.assistable.ai/introduction/chat-ai Adjusts the AI's response speed in text-based channels, adding to the base response time which depends on prompt length, knowledge base size, and tools. ```APIDOC Wait Time: Type: Adjustable duration Purpose: Controls AI response speed in text channels. Effect: Adds to base response time (dependent on prompt, knowledge base, tools). ``` -------------------------------- ### Agent Chat Completion (GHL-Safe) API Reference Source: https://docs.assistable.ai/introduction/api-reference/agent-chat-completion-ghl-safe Comprehensive API documentation for the POST /v2/ghl-chat-completion endpoint. It details the required authorization, the structure of the request body parameters, and the expected successful response schema. ```APIDOC Endpoint: POST /v2/ghl-chat-completion Description: Initiates an agent chat completion, safe for GHL (GoHighLevel) environments. Authorizations: - Type: Bearer Token Location: Header Parameter: Authorization Format: Bearer Required: Yes Description: Your authentication token. Request Body (application/json): - conversation_id: (Required) - Unique identifier for the conversation. - contact_id: (Required) - Identifier for the contact. - last_message_id: (Required) - ID of the last message in the conversation. - channel: (Required) - The communication channel. - input: (Required) - The user's input message. - location_id: (Required) - The location identifier. - messages: array of objects (Required) - Array of message objects. - assistant_id: (Required) - The ID of the assistant to use. Responses: - Status: 200 OK Content-Type: application/json Description: Chat completion successful. Schema: run: object response: object messages: array of objects role: content: refusal: annotations: array of objects toolCalls: array of objects completionTimestamp: string (ISO 8601 datetime) message: object conversationId: messageId: traceId: knowledge_base: object matches: array of objects id: score: number values: array of objects metadata: object text: namespace: usage: object readUnits: number input: output: ``` -------------------------------- ### API Documentation: Archive Assistant Endpoint Source: https://docs.assistable.ai/introduction/api-reference/archive-assistant Comprehensive API documentation for the DELETE /v2/delete-assistant endpoint, including method, path, authorization, query parameters, and successful response schema. ```APIDOC DELETE /v2/delete-assistant ``` ```APIDOC Authorization: type: string location: header required: true description: Bearer authentication header of the form `Bearer `, where `` is your auth token. ``` ```APIDOC Query Parameters: assistant_id: type: string required: true description: ID of the assistant to delete ``` ```APIDOC Response: 200 - application/json description: Assistant deleted successfully type: object schema: status: 123 data: status: "" id: "" ``` -------------------------------- ### API Reference: Make AI Call (GHL-Safe) Endpoint Source: https://docs.assistable.ai/introduction/api-reference/make-ai-call-ghl-safe Detailed API documentation for the POST /v2/ghl/make-call endpoint, used to initiate AI calls. This section covers the endpoint path, required authorization header, the structure of the JSON request body, and the expected JSON response for a successful call. ```APIDOC POST /v2/ghl/make-call ``` ```APIDOC Authorization: Type: string Location: header Required: true Description: Bearer authentication header of the form `Bearer `, where `` is your auth token. ``` ```APIDOC Request Body (application/json): { "number_pool_id": "", "assistant_id": "", "location_id": "", "contact_id": "" } ``` ```APIDOC Response 200 (application/json): Description: Call successfully initiated. The response is of type `object`. { "success": true, "call_id": "", "returned_an_error": true, "error_message": "", "error_code": 123 } ``` -------------------------------- ### Update Assistant API Endpoint Specification Source: https://docs.assistable.ai/introduction/api-reference/update-assistant Defines the structure and requirements for the PUT /v2/update-assistant API endpoint, including authorization, request body parameters, and the expected 200 OK response format. ```APIDOC Endpoint: PUT /v2/update-assistant Authorization: Type: Bearer authentication Location: header Name: Authorization Description: Bearer authentication header of the form `Bearer `, where `` is your auth token. Request Body (application/json): name: (Assistant's name) assistant_id: (ID of the assistant to update) location_id: (Location ID) ambient_noise: (Ambient noise setting) prompt: (Assistant's prompt) temperature: 123 (number, Temperature setting) model: "gpt-4" (string, AI model to use) queue: 123 (number, Queue setting) knowledge_id: (Knowledge base ID) voice_id: (Voice ID) Response (200 OK - application/json): Description: Assistant updated successfully status: 123 (number) data: status: id: ``` -------------------------------- ### APIDOC: Autopilot Setting - Max AI Responses per Contact Source: https://docs.assistable.ai/introduction/chat-ai Sets a maximum number of AI responses for a contact over their lifetime, with the AI ceasing to respond once the limit is reached. Limits are overwritten by the assistant's current settings. ```APIDOC Max Responses: Type: Integer limit Purpose: Sets maximum AI responses over a contact's lifetime. Behavior: AI stops responding once limit is reached. Override: Overwritten by current assistant settings. ``` -------------------------------- ### Agent Chat Completion (GHL-Safe) API Success Response Source: https://docs.assistable.ai/introduction/api-reference/agent-chat-completion-ghl-safe This JSON object represents a successful response from the /v2/ghl-chat-completion endpoint, detailing the run's response messages, tool calls, completion timestamp, message metadata, knowledge base matches, and input/output. ```JSON { "run": { "response": { "messages": [ { "role": "", "content": "", "refusal": "", "annotations": [ {} ] } ], "toolCalls": [ {} ], "completionTimestamp": "2023-11-07T05:31:56Z" }, "message": { "conversationId": "", "messageId": "", "traceId": "" }, "knowledge_base": { "matches": [ { "id": "", "score": 123, "values": [ {} ], "metadata": { "text": "" } } ], "namespace": "", "usage": { "readUnits": 123 } }, "input": "", "output": "" } } ``` -------------------------------- ### APIDOC: Autopilot Setting - AI Sleep Mode Source: https://docs.assistable.ai/introduction/chat-ai Enables pausing the AI for a configured duration when a workflow or user message is sent, preventing conflicts between AI and human interactions. ```APIDOC Sleep Mode: Type: Toggle, configurable duration Purpose: Pauses AI when workflow/user message is sent. Effect: Mitigates AI-human interaction conflicts. ``` -------------------------------- ### APIDOC: Remove Tag Tool Type Source: https://docs.assistable.ai/introduction/chat-ai Details removing a tag from a GoHighLevel contact based on specified conditions. ```APIDOC Remove Tag: Description: Removes a tag from a contact in GoHighLevel. Condition: Based on outlined description. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.