### HTTP GET Request Example for Querying Documentation Source: https://docs.connectly.ai/integrations/scripts.md Demonstrates how to query the documentation dynamically using an HTTP GET request with the 'ask' query parameter. ```http GET https://docs.connectly.ai/integrations/scripts.md?ask= ``` -------------------------------- ### Example API Request for Querying Documentation Source: https://docs.connectly.ai/integrations/integrations/webengage-integration.md To get information not explicitly present on a page, you can query the documentation dynamically. This example shows how to make a GET request with an 'ask' parameter. ```bash GET https://docs.connectly.ai/integrations/integrations/webengage-integration.md?ask= ``` -------------------------------- ### Example Request to Get Asset Source: https://docs.connectly.ai/assets/assets-api/get-asset.md Use this cURL command to make a GET request to retrieve an asset. Ensure you replace placeholders with your actual business ID, asset ID, and API key. ```bash curl -X GET "https://api.connectly.ai/v1/businesses/550e8400-e29b-41d4-a716-446655440000/assets/6ba7b810-9dad-11d1-80b4-00c04fd430c8" \ -H "X-API-Key: your-api-key" ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.connectly.ai/assets/assets-api/create-asset.md Send an HTTP GET request to a documentation URL with the 'ask' query parameter to get dynamic answers. The question should be specific and in natural language. ```bash GET https://docs.connectly.ai/assets/assets-api/create-asset.md?ask= ``` -------------------------------- ### Example Conversion Event Request Source: https://docs.connectly.ai/analytics/capi-conversion-reporting-endpoint.md This example demonstrates how to structure a 'Purchase' event using cURL. It includes essential fields like tracking IDs, event name, attribution details, and a detailed payload. Capture query parameters from the landing URL to populate tracking IDs and attribution values. ```curl curl -i -X POST "https://api.connectly.ai/external/v1/businesses//conversion_events" \ -H "Content-Type: application/json" \ -H "X-API-KEY: " \ -d '{ "cnct_tracking_id": "", "event_name": "Purchase", "sendout_id": "", "attribution": { "meta_ctwa": { "ctwa_clid": "", "ad_id": "" } }, "payload": { "currency": "USD", "value": 99.97, "order_id": "ORD-7821", "content_type": "product", "content_ids": ["data-pass-30d", "phone-case-blk"], "num_items": 2, "contents": [ { "id": "data-pass-30d", "quantity": 1, "item_price": 49.99 }, { "id": "phone-case-blk", "quantity": 1, "item_price": 49.98 } ], "event_time": 1746480000 } }' ``` -------------------------------- ### Querying Documentation via HTTP GET Source: https://docs.connectly.ai/message-api/webhook-api/webhook-payload/delivery-status-error-codes.md To get more information not explicitly on this page, perform an HTTP GET request to the page URL with an 'ask' query parameter containing your question. ```http GET https://docs.connectly.ai/message-api/webhook-api/webhook-payload/delivery-status-error-codes.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Request Source: https://docs.connectly.ai/faq.md To get specific answers or additional context not explicitly found on a documentation page, send an HTTP GET request to the page URL with an 'ask' query parameter. The question should be specific and in natural language. ```http GET https://docs.connectly.ai/faq.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.connectly.ai/integrations/alpha-moengage/messageservice/send-campaign-via-api.md To get information not explicitly on this page, perform an HTTP GET request to the page URL with the `ask` query parameter. The question should be specific and in natural language. ```http GET https://docs.connectly.ai/integrations/alpha-moengage/messageservice/send-campaign-via-api.md?ask= ``` -------------------------------- ### Querying Documentation Source: https://docs.connectly.ai/message-api/webhook-api/webhookservice/delete-a-webhook-registration-for-business.md To get more information not present on this page, perform an HTTP GET request to the page URL with the `ask` query parameter. The question should be specific and self-contained. ```http GET https://docs.connectly.ai/message-api/webhook-api/webhookservice/delete-a-webhook-registration-for-business.md?ask= ``` -------------------------------- ### Example 'messages' Topic Description Source: https://docs.connectly.ai/message-api/webhook-api/webhookservice/create-a-webhook-registration-by-event-topic.md This example shows the structure of a message event payload for the 'messages' topic, including sender, recipient, and message content. ```json {"timestamp":"1640203838", "sender":{"id":"+16044441111", "channelType":"whatsapp"}, "recipient":{"id":"+16041112222", "channelType":"whatsapp"}, "message":{"text":"hello"}} ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.connectly.ai/assets/assets-api.md To get answers not explicitly on the page, perform an HTTP GET request to the documentation URL with an 'ask' query parameter containing your question. ```http GET https://docs.connectly.ai/assets/assets-api.md?ask= ``` -------------------------------- ### Query Documentation via HTTP GET Source: https://docs.connectly.ai/message-api/message-service-api/messageservice/send-session-message.md Use this method to ask questions about the documentation dynamically. The response includes direct answers and relevant excerpts from the source. ```bash GET https://docs.connectly.ai/message-api/message-service-api/messageservice/send-session-message.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.connectly.ai/assets To ask questions about the documentation, perform an HTTP GET request to the current page URL with the 'ask' query parameter. The question should be specific and self-contained. ```HTTP GET https://docs.connectly.ai/assets.md?ask= ``` -------------------------------- ### Query Documentation with Time Delay Source: https://docs.connectly.ai/how-to-use-time-delay.md To get specific information not directly on a page, make an HTTP GET request to the page URL with the 'ask' query parameter. The question should be clear and self-contained. ```http GET https://docs.connectly.ai/how-to-use-time-delay.md?ask= ``` -------------------------------- ### Query Documentation Source: https://docs.connectly.ai/campaigns/campaign-sendout/send-campaigns.md To get more information not present on the page, make an HTTP GET request to the current page URL with the 'ask' query parameter. The question should be specific and in natural language. ```HTTP GET https://docs.connectly.ai/campaigns/campaign-sendout/send-campaigns.md?ask= ``` -------------------------------- ### POST /external/v1/ai/agent_graph/init Source: https://docs.connectly.ai/agent-graph/agent-graph-api/initialize.md Initializes an Agent Graph session. This is the entry point for starting a new AI agent interaction. ```APIDOC ## POST /external/v1/ai/agent_graph/init ### Description Initializes an Agent Graph session. This is the entry point for starting a new AI agent interaction. ### Method POST ### Endpoint /external/v1/ai/agent_graph/init ### Parameters #### Request Body - **businessId** (string) - Required - The unique identifier for the business. - **clientKey** (string) - Required - The key associated with the client. ### Request Example { "businessId": "string", "clientKey": "string" } ### Response #### Success Response (200) - **aiv1ExternalInitializeAgentGraphSessionV1Response** (object) - The response schema for initializing an agent graph session. #### Response Example { "example": "response body" } ``` -------------------------------- ### Create Template Response (201 Created) Source: https://docs.connectly.ai/business-management/business-management-api/template-management/create-a-template.md Example response when a template is successfully created. This includes details about the template's components, language, and status. ```javascript { "entity": { "id": "template_test", "templates": [ { "channel": null, "id": "1385622408844485", "language": { "code": "en_US" }, "status": "MESSAGE_TEMPLATE_STATUS_PENDING", "createdAt": "2023-01-18T01:07:20.075195879Z", "updatedAt": "2023-01-18T01:07:20.075195879Z", "externalTemplate": null, "components": [], "templateComponents": [ { "header": { "media": { "type": "TYPE_IMAGE", "example": [ "https://uploads-ssl.webflow.com/60c6f467ba3a281e33bc3449/62bcc6414212753dc33b5c2d_312313.png" ] } } }, { "body": { "text": { "text": "Hi {{1}}, Welcome to Connectly. Do you want to learn more?", "example": [ "Lorem" ] } } }, { "footer": { "text": { "text": "Reply 'Stop' to opt out", "example": [] } } }, { "button": { "quickReply": { "text": "Learn more" } } }, { "button": { "quickReply": { "text": "Not interested" } } } ], "rejectionReason": null } ], "name": "template_test3", "category": "MARKETING", "createdAt": null, "updatedAt": null } } ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.connectly.ai/analytics/analytics/reports-api/webhooks-configuration.md To get answers not explicitly on this page, perform an HTTP GET request to the page URL with the 'ask' query parameter. The response will contain a direct answer and relevant excerpts. ```http GET https://docs.connectly.ai/analytics/analytics/reports-api/webhooks-configuration.md?ask= ``` -------------------------------- ### Query Documentation API Source: https://docs.connectly.ai/assets/assets-api/get-asset.md To get answers to questions not explicitly covered on this page, make a GET request to the page URL with an 'ask' query parameter. ```http GET https://docs.connectly.ai/assets/assets-api/get-asset.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.connectly.ai/analytics/analytics.md To ask questions about the documentation, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and in natural language. ```HTTP GET https://docs.connectly.ai/analytics/analytics.md?ask= ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.connectly.ai/agent-graph/agent-graph-api/invoke-non-stream.md Use this method to ask specific questions about the documentation when the answer is not explicitly present on the current page. The question should be self-contained and in natural language. ```bash GET https://docs.connectly.ai/agent-graph/agent-graph-api/invoke-non-stream.md?ask= ``` -------------------------------- ### Example CAPI Conversion Event Payload Source: https://docs.connectly.ai/analytics/capi-conversion-reporting-endpoint.md This is an example of the payload structure for sending conversion events, including product details like ID, quantity, and item price. ```json { "events": [ { "event_name": "Purchase", "event_time": 1698778000, "payload": { "value": 123.45, "currency": "USD", "contents": [ { "id": "SKU123", "quantity": 2, "item_price": 45.00 }, { "id": "SKU456", "quantity": 1, "item_price": 33.45 } ] } } ] } ``` -------------------------------- ### Querying Documentation with HTTP GET Source: https://docs.connectly.ai/business-management/business-management-api/template-management/get-templates.md Use this method to ask specific questions about the documentation when the answer is not explicitly present. The response includes a direct answer, excerpts, and sources. ```http GET https://docs.connectly.ai/business-management/business-management-api/template-management/get-templates.md?ask= ``` -------------------------------- ### POST /external/v1/ai/agent_graph/init Source: https://docs.connectly.ai/agent-graph/agent-graph-api/initialize.md Initializes a new agent graph session for a given business. This is the entry point for starting a new AI-driven conversation or task. ```APIDOC ## POST /external/v1/ai/agent_graph/init ### Description Initializes a new agent graph session for a given business. This is the entry point for starting a new AI-driven conversation or task. ### Method POST ### Endpoint /external/v1/ai/agent_graph/init ### Parameters #### Request Body - **businessId** (string) - Required - The unique identifier for the business. - **clientKey** (string) - Required - The client key for authentication. ### Request Example { "businessId": "your_business_id", "clientKey": "your_client_key" } ### Response #### Success Response (200) - **sessionId** (string) - The unique identifier for the newly created session. #### Response Example { "sessionId": "generated_session_id" } ``` -------------------------------- ### Sample Response for Get Templates API Source: https://docs.connectly.ai/business-management/business-management-api/template-management/get-templates.md This is a sample JSON response when the Get Templates API call is successful (200 OK). It outlines the structure of template groups and individual templates. ```json { "entity": { "templateGroups": [ { "id": "joscha_test", "templates": [ { "channel": { "id": "71c9537f-7f0c-42aa-8ec0-07b4a4d900fe", "externalId": "1381173951234567", "channelType": "CHANNEL_TYPE_WHATSAPP_CLOUD" }, "id": "651213231234567", "language": { "code": "en" }, "status": "MESSAGE_TEMPLATE_STATUS_REJECTED", "createdAt": "2022-03-09T23:07:01Z", "updatedAt": "2022-03-09T23:07:01Z", "externalTemplate": { "whatsapp": { "id": "651213231234567", "name": "joscha_test", "language": "en", "status": "REJECTED", "category": "ACCOUNT_UPDATE", "components": [ { "type": "HEADER", "format": "IMAGE", "text": null, "buttons": [], "example": { "headerText": [], "headerHandle": [ "https://scontent.whatsapp.net/v/t61.29466-34/261112688_651213235993940_6898816420295643144_n.png?ccb=1-7&_nc_sid=57045b&_nc_ohc=23j1dNPE0ysAX_uPy3J&_nc_ht=scontent.whatsapp.net&edm=AH51TzQEAAAA&oh=01_AVx5aCD7zLYtP_S-FBMXwjoT-FnbGVpdS-gwDeiFNy-I-g&oe=62F57EFF" ], "bodyText": [] } }, { "type": "BODY", "format": "FORMAT_UNSPECIFIED", "text": "Welcome to Connectly! ??", "buttons": [], "example": null }, { "type": "FOOTER", "format": "FORMAT_UNSPECIFIED", "text": "Connectly.ai", "buttons": [], "example": null }, { "type": "BUTTONS", "format": "FORMAT_UNSPECIFIED", "text": null, "buttons": [ { "type": "QUICK_REPLY", "text": "Continue", "url": "", "phoneNumber": "", "example": [] }, { "type": "QUICK_REPLY", "text": "Stop", "url": "", "phoneNumber": "", "example": [] } ], "example": null } ], "lastUpdatedTime": "2022-03-09T23:07:01+0000", "rejectedReason": "INVALID_FORMAT", "qualityScore": { "score": "UNKNOWN" } } }, "components": [], "templateComponents": [ { "header": { ``` -------------------------------- ### Basic Campaign Entry Source: https://docs.connectly.ai/campaigns/campaign-sendout/send-campaigns.md Minimal setup for campaign entry with only required fields. Use when the campaign does not require any variables. ```json { "client": "+16505551236", "campaignName": "campaign_basic" } ``` -------------------------------- ### Query Documentation Source: https://docs.connectly.ai/message-api/message-service-api.md Dynamically query the documentation by asking a question via an HTTP GET request. ```APIDOC ## GET /message-api/message-service-api.md ### Description Allows users to ask questions about the documentation and receive direct answers with relevant excerpts. ### Method GET ### Endpoint /message-api/message-service-api.md ### Parameters #### Query Parameters - **ask** (string) - Required - A specific, self-contained question in natural language. ### Response #### Success Response (200) - **answer** (string) - A direct answer to the question. - **excerpts** (array) - Relevant excerpts from the documentation. - **source** (string) - The source of the excerpt. - **text** (string) - The excerpt text. - **sources** (array) - Relevant documentation sources. - **url** (string) - The URL of the source document. ``` -------------------------------- ### Get Templates API Path Parameters Source: https://docs.connectly.ai/business-management/business-management-api/template-management/get-templates.md The API requires a business ID as a path parameter to identify the account. ```markdown | Name | Type | | ---------- | ------ | | businessId | String | ``` -------------------------------- ### Query Sofia AI Documentation Source: https://docs.connectly.ai/sofia-ai To ask questions about the documentation, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and in natural language. ```http GET https://docs.connectly.ai/sofia-ai.md?ask= ``` -------------------------------- ### Image Header for Interactive Messages Source: https://docs.connectly.ai/message-api/message-service-api/messageservice/send-session-message.md Example of an image header structure for list or quick reply messages. Requires attachment type and URL. ```text "header": { "attachment": { "type": "image", "url": "https://cdn.connectly.ai/26fa/26fa1308-d328-41c9-a6a1-d5f4225a3768" } } ``` -------------------------------- ### Query Sofia AI Documentation Source: https://docs.connectly.ai/sofia-ai/sofia-ai-api.md To ask a question about the documentation, perform an HTTP GET request to the page URL with the 'ask' query parameter. The question should be specific and in natural language. ```HTTP GET https://docs.connectly.ai/sofia-ai/sofia-ai-api.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.connectly.ai/agent-graph/agent-graph-api/initialize.md Perform an HTTP GET request on the current page URL with the `ask` query parameter to ask a question about the documentation. The response will contain a direct answer and relevant excerpts. ```bash GET https://docs.connectly.ai/agent-graph/agent-graph-api/initialize.md?ask= ``` -------------------------------- ### Get Webhook Registrations Source: https://docs.connectly.ai/message-api Get webhook registrations for a business. ```APIDOC ## Get Webhook Registrations ### Description Get webhook registrations for business. ### Endpoint /message-api/webhook-api/webhookservice/get-webhook-registrations-for-business.md ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.connectly.ai/agent-graph Use this method to ask questions about the documentation. The response includes a direct answer and relevant excerpts from the documentation. ```HTTP GET https://docs.connectly.ai/agent-graph.md?ask= ``` -------------------------------- ### Query Documentation Dynamically Source: https://docs.connectly.ai/agent-graph/overview.md Use this method to ask questions about the documentation. The response includes direct answers and relevant excerpts. ```http GET https://docs.connectly.ai/agent-graph/overview.md?ask= ``` -------------------------------- ### Example Delivery Status Event (Delivered) Source: https://docs.connectly.ai/message-api/webhook-api.md This is an example of a JSON payload received when a message has been successfully delivered to the recipient. ```json { "topic": "delivery_status", "timestamp": "1641513098", "sender": { "id": "+16044441234", "channelType": "whatsapp", "name": "connectlyai" }, "recipient": { "id": "+16315555500", "channelType": "whatsapp", "name": "Vasi from Connectly" }, "statusUpdate": { "id": "01FRRWW2ZAHD9GJ1SWY4VF2GBD", "status": "delivered", "error": null, "metadata": { "campaignName": "connectly_test_campaign" } } } ``` -------------------------------- ### Ask a Question via Documentation Query Interface Source: https://docs.connectly.ai/llms.txt Use this GET request to query the documentation index with a natural language question. The response includes the answer and relevant sources. ```http GET https://docs.connectly.ai/quick-start.md?ask= ``` -------------------------------- ### Example 'messages' Webhook Payload Source: https://docs.connectly.ai/message-api/webhook-api/webhookservice/create-a-webhook-registration-by-event-topic.md This is an example of the payload structure you will receive when a client messages your endpoint, once registered for the 'messages' topic. ```json { "u'sender'": {u'channelType': u'whatsapp', u'id': u'+12223334444', u'name': u'Tom'}, "u'timestamp'": u'1661301940', "u'buttonResponse'": {u'text': u'Yes I'm interested', u'id': u'01GB6MZR50BY04MDAQH6TVYN40', u'payload': u'1'}, "u'topic'": u'messages', "u'recipient'": {u'channelType': u'whatsapp', u'id': u'+15556667777', u'name': u'Business'}, "u'metadata'": None } ``` -------------------------------- ### Get Webhook Registrations Source: https://docs.connectly.ai/message-api/webhook-api/webhookservice/get-webhook-registrations-for-business.md Fetches all webhook registrations for a specified business ID. This is a GET request to the /v1/businesses/{businessId}/webhooks endpoint. ```APIDOC ## GET /v1/businesses/{businessId}/webhooks ### Description Retrieves a list of webhook registrations for a specific business. ### Method GET ### Endpoint /v1/businesses/{businessId}/webhooks ### Parameters #### Path Parameters - **businessId** (string) - Required - The unique identifier of the business for which to retrieve webhook registrations. ### Response #### Success Response (200) - **registrations** (array) - A list of webhook registration objects. - **id** (string) - The unique identifier of the webhook registration. - **url** (string) - The URL where webhook events will be sent. - **events** (array) - A list of event types that this webhook is subscribed to. - **createdAt** (string) - The timestamp when the webhook registration was created. - **updatedAt** (string) - The timestamp when the webhook registration was last updated. #### Response Example ```json { "registrations": [ { "id": "whreg_12345", "url": "https://example.com/webhook", "events": ["order.created", "order.updated"], "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Query Documentation API Source: https://docs.connectly.ai/business-management/business-management-api/quality-signals.md Demonstrates how to query the documentation dynamically by appending an 'ask' parameter with a natural language question to the page URL. ```http GET https://docs.connectly.ai/business-management/business-management-api/quality-signals.md?ask= ``` -------------------------------- ### WhatsApp Message Webhook Payload Example Source: https://docs.connectly.ai/message-api/webhook-api.md This is an example of the JSON payload received when a WhatsApp message event is triggered. It includes sender, recipient, message content, and timestamp details. ```json // Headers: { "content-length": "154", "x-connectly-hmac-sha256": "OS/QJB97O/sOj3Ugh4vUJ32EE2++vWq9o51ajIJZwuo=", "user-agent": "go-resty/2.6.0 (https://github.com/go-resty/resty)", "content-type": "text/plain; charset=utf-8", "accept-encoding": "gzip" } // Body { "timestamp": "1639083206", "sender": { "id": "+16315555500", "channelType": "whatsapp", "name": "Vasi from Connectly" }, "recipient": { "id": "+16044441234", "channelType": "whatsapp", "name": "connectlyai" }, "message": { "text": "TEST 11" }, "attachments": [], "location": null } ``` -------------------------------- ### Initialize Source: https://docs.connectly.ai/agent-graph/agent-graph-api.md Initializes a new session for the Agent Graph API. This is the first step to interacting with the agent. ```APIDOC ## Initialize ### Description Initialize a new session. ### Endpoint /agent-graph/agent-graph-api/initialize.md ``` -------------------------------- ### Get Asset Endpoint Source: https://docs.connectly.ai/assets/assets-api/get-asset.md The endpoint for retrieving a specific asset within a business. ```http GET /v1/businesses/{businessId}/assets/{assetId} ``` -------------------------------- ### Campaign Sendout Error Response Source: https://docs.connectly.ai/campaigns/campaign-sendout/send-campaigns.md Example of an error response when sending a campaign. ```json { "sendoutId": "183e801b-1438-4177-b283-909135096e69", "status": "error", "acceptedCount": 0, "rejectedCount": 1, "error": { "message": "Campaign entry is invalid", "type": "ERROR_TYPE_INVALID_REQUEST", "code": "ERROR_CODE_CAMPAIGN_ENTRY_INVALID", "userTitle": "Campaign entry is invalid", "userMessage": "Please check the inputs to the campaign entry." } } ] } ``` -------------------------------- ### Delivery Status Event Payload Source: https://docs.connectly.ai/message-api/webhook-api.md Example payload structure for a successful delivery status event. ```APIDOC ## Delivery Status Event ### Description This is an example of the JSON payload received when a message's delivery status is updated. ### Response Example ```json { "topic": "delivery_status", "timestamp": "1641513098", "sender": { "id": "+16044441234", "channelType": "whatsapp", "name": "connectlyai" }, "recipient": { "id": "+16315555500", "channelType": "whatsapp", "name": "Vasi from Connectly" }, "statusUpdate": { "id": "01FRRWW2ZAHD9GJ1SWY4VF2GBD", "status": "delivered", "error": null, "metadata": { "campaignName": "connectly_test_campaign" } } } ``` ``` -------------------------------- ### Query Agent Graph API Documentation Source: https://docs.connectly.ai/agent-graph/agent-graph-api/health.md Use this method to ask questions about the documentation dynamically. The response includes direct answers and relevant excerpts from the documentation. ```http GET https://docs.connectly.ai/agent-graph/agent-graph-api/health.md?ask= ``` -------------------------------- ### Get Asset CDN URL Source: https://docs.connectly.ai/assets/assets-api.md Retrieves the CDN URL for a specific asset. Requires authentication via API key. ```APIDOC ## GET /v1/businesses/{businessId}/assets/{assetId} ### Description Gets the CDN URL for a specific asset. ### Method GET ### Endpoint /v1/businesses/{businessId}/assets/{assetId} ### Parameters #### Path Parameters - **businessId** (string) - Required - The ID of the business. - **assetId** (string) - Required - The ID of the asset. ### Response #### Success Response (200) - **cdnUrl** (string) - The Content Delivery Network URL for the asset. ### Response Example ```json { "cdnUrl": "https://cdn.connectly.ai/assets/asset_12345.jpg" } ``` ``` -------------------------------- ### Example Script Node Execution Source: https://docs.connectly.ai/integrations/scripts.md This script demonstrates accessing input, fetching data from an external API, and returning structured data and an outcome. It logs a message to the console and parses a JSON response. ```javascript // name=SCRIPT_NODE1 export async function onExecute(input, config) { console.log('hello from script node!'); const resp = await fetch('https://jsonplaceholder.typicode.com/users/1'); const body = await resp.json(); // 👉 return [data, outcome] return [{FIELD1: 'one', FIELD2: 42, userName: body.name}, 'OUTCOME2']; } ``` -------------------------------- ### Query Documentation with GET Request Source: https://docs.connectly.ai/quick-start/authentication.md You can query the Connectly AI documentation dynamically by appending the 'ask' query parameter to the page URL. This is useful for retrieving specific information or clarifications not explicitly stated on the page. ```http GET https://docs.connectly.ai/quick-start/authentication.md?ask= ``` -------------------------------- ### Get Asset Source: https://docs.connectly.ai/assets/assets-api/get-asset.md Retrieves the CDN URL for a specified asset within a business. Requires business ID and asset ID. ```APIDOC ## GET /v1/businesses/{businessId}/assets/{assetId} ### Description Retrieves the CDN URL for a specified asset within a business. Requires business ID and asset ID. ### Method GET ### Endpoint /v1/businesses/{businessId}/assets/{assetId} ### Parameters #### Path Parameters - **businessId** (string) - Yes - Your business ID (UUID format) - **assetId** (string) - Yes - The asset ID to retrieve ### Response #### Success Response (200) - **cdnUri** (string) - CDN URL where the asset is accessible #### Response Example ```json { "cdnUri": "https://cdn.connectly.ai/assets/6ba7b810-9dad-11d1-80b4-00c04fd430c8" } ``` ### Error Responses #### Authentication Error (401) ```json { "code": 16, "message": "XASSET.UNAUTHENTICATED: missing or invalid API key" } ``` #### Asset Not Found (404) ```json { "code": 5, "message": "XASSET.NOT_FOUND: asset not found" } ``` #### Invalid Asset ID (400) ```json { "code": 3, "message": "XASSET.INVALID_ARGUMENT: invalid asset_id format" } ``` ### Rate Limiting This endpoint is limited to **100 requests per second**. If the limit is exceeded, the API will return a `429 Too Many Requests` response. ```