API Reference
Objects and arrays are fundamental data structures in JavaScript. Objects store data in key-value pairs, while arrays hold ordered collections of values.
SketricGen Agent Response API
Overview
The SketricGen Agent Response API allows you to send messages to your SketricGen AI agents and receive AI-powered responses. This API enables seamless integration between your applications and SketricGen conversational AI.
Base Information
Endpoint:
POST https://api.sketricgen.ai/v1/agent-response
Authentication: API Key + User ID
Content Type:
application/json
Method: POST
Authentication
All requests must include authentication headers:
Header | Type | Required | Description |
---|---|---|---|
| string | ✅ | User’s API key for authentication |
| string | ✅ | User’s UUID for identification |
Request Schema
Headers
Accessing Object Properties
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
| string | ✅ | The user’s message text to process |
| string | ✅ | SketricGen agent identifier |
| string | ❌ | Unique identifier for the contact/conversation. If not provided, a random ID will be generated |
Response Schema
Success Response (200)
Response Fields
Field | Type | Description |
---|---|---|
| boolean | Indicates if the request was successful |
| string | AI-generated response from your SketricGen agent |
| string | Contact identifier for conversation continuity |
Error Responses
Authentication Required (401)
Invalid Request (400)
Testing
cURL Example
Getting Started
1. Obtain API Credentials
Get your API key from your SketricGen dashboard
Note your User ID from your account settings
2. Set Up Your Agent
Create and configure your AI agent in the SketricGen platform
Note the
agent_id
for API calls