Skip to main content
POST
/
v1
/
external-support
/
{projectId}
/
conversations
/
start
Start Conversation
curl --request POST \
  --url https://gateway.jelou.ai/jelouapi/v1/external-support/{projectId}/conversations/start \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "botId": "<string>",
  "userId": "<string>",
  "initialMessage": "<string>",
  "metadata": {},
  "assignment": {
    "type": "<string>",
    "target": "<string>"
  }
}
'
{
  "message": "<string>",
  "statusMessage": "<string>",
  "status": 123,
  "error": {
    "code": "<string>",
    "key": "<string>",
    "description": "<string>",
    "developerMessages": {},
    "clientMessages": {}
  },
  "validationError": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt

Use this file to discover all available pages before exploring further.

Description

Starts a new conversation with an end user in the external support panel. Allows specifying the bot that will handle the conversation, the target user, an initial message, and assignment data for queues or agents. Upon execution, Jelou emits the conversation.start event to the webhook configured in the integration.

Endpoint

POST https://gateway.jelou.ai/jelouapi/v1/external-support/{projectId}/conversations/start

Path parameters

projectId
string
required
Unique identifier of the Jelou project from which the conversation is started.

Body parameters

botId
string
required
Identifier of the Jelou bot that will manage the conversation.
userId
string
required
Identifier of the end user with whom the conversation will be started.
initialMessage
string
Initial message to be sent when the conversation starts. If omitted, the conversation starts without a prior message.
metadata
object
Additional data associated with the conversation. Can include external identifiers, ticket numbers, or other context relevant to your system.Example: { "ticketId": "T-12345" }
assignment
object
Assignment configuration for routing the conversation to a specific queue or agent.
  • type — Assignment type: queue, operator, or team.
  • target — Queue name or target agent identifier.

Authentication

All requests must include the x-api-key header with your Jelou project API key.
x-api-key: API_KEY

Request example

The following example starts a conversation with assignment to the SUPPORT queue and includes ticket metadata:
cURL
curl --request POST \
  --url https://gateway.jelou.ai/jelouapi/v1/external-support/PROJECT_ID/conversations/start \
  --header 'x-api-key: API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "botId": "BOT_ID",
    "userId": "USER_ID",
    "initialMessage": "Hello, I need help",
    "metadata": { "ticketId": "T-12345" },
    "assignment": { "type": "queue", "target": "SUPPORT" }
  }'

Responses

CodeStatusDescription
200OKConversation started successfully.
401UnauthorizedInvalid or missing authentication credentials.
404Not FoundBot or user not found.
422Bad RequestRequired fields are missing or the format is invalid.
500Internal Server ErrorInternal server error.

Response example

{
  "message": [
    "Conversation started successfully"
  ],
  "statusMessage": "success",
  "status": 1,
  "data": {
    "conversationId": "CONVERSATION_ID",
    "botId": "BOT_ID",
    "userId": "USER_ID",
    "status": "active"
  }
}

Webhook event conversation.start

When this resource is executed, Jelou will emit the conversation.start event to the webhook configured in the integration. The payload varies depending on the fields sent in the request.
{
  "event": "conversation.start",
  "timestamp": 1776133797422,
  "field": "conversation",
  "object": "conversation_event",
  "event_type": "start",
  "project_id": "PROJECT_ID",
  "room_id": "ROOM_ID",
  "contact": {
    "id": "USER_ID",
    "name": "USER_NAME"
  },
  "conversation": {
    "id": "CONVERSATION_ID"
  },
  "bot": {
    "id": "BOT_ID",
    "name": "BOT_NAME"
  },
  "value": {}
}

Payload fields

FieldTypeDescription
eventstringEvent name: conversation.start
timestampnumberUnix timestamp in milliseconds at the time of the event.
project_idstringJelou project identifier.
room_idstringConversation room identifier.
contact.idstringEnd user identifier.
contact.namestringEnd user name.
conversation.idstringUnique identifier of the started conversation.
conversation.assignment.typestringAssignment type: queue or direct.
conversation.assignment.targetstringQueue name or target agent ID.
bot.idstringAssigned bot identifier.
bot.namestringAssigned bot name.
value.initial_messagestringInitial message sent when the conversation started (optional).
value.metadataobjectAdditional conversation metadata (optional).

Authorizations

Authorization
string
header
required

Basic authentication using Base64 encoded clientId:clientSecret

Path Parameters

projectId
string
required

Unique identifier of the Jelou project

Body

application/json
botId
string
required
userId
string
required
initialMessage
string
metadata
object
assignment
object

Response

Conversation started successfully