Workflow API
pk_live_Search API
sk_live_https://agent.askhandle.com/api/v1/public/conversations/startStart a new conversation with your AI agent. Returns a conversation ID and the initial greeting message.
Requires X-API-Key header — Your public API key (starts with pk_live_)
Content-TypeX-API-KeyOptional metadata object
{
"metadata": {
"userId": "user_123",
"customField": "optional_value"
}
}{
"conversationId": "conv_abc123def456",
"message": "👋 Welcome! How can I help you today?",
"workflowName": "Customer Support Bot"
}API key is missing or invalid
{
"error": "Missing API key. Include X-API-Key header."
}Workflow doesn't exist or hasn't been published
{
"error": "Workflow not found or not published."
}Workflow configuration error
{
"error": "Workflow does not have a Start node configured."
}const response = await fetch('https://agent.askhandle.com/api/v1/public/conversations/start', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'pk_live_your_api_key_here'
},
body: JSON.stringify({
metadata: {
userId: 'user_123'
}
})
});
const data = await response.json();
console.log('Conversation ID:', data.conversationId);
console.log('Message:', data.message);